var a:integer;
begin
writeln ('Vvedite nomer mesuaca');
read (a);
if (a=1) then writeln ('30');
if (a=2) then writeln ('28');
if (a=3) then writeln ('30');
if (a=4) then writeln ('31');
if (a=5) then writeln ('30');
if (a=6) then writeln ('31');
if (a=7) then writeln ('30');
if (a=8) then writeln ('31');
if (a=9) then writeln ('30');
if (a=10) then writeln ('31');
if (a=11) then writeln ('30');
if (a=12) then writeln ('31');
end.