uses wincrt;

function isleapyear(year:longint):boolean;
  begin
    isleapyear := (((year mod 4=0) and not (year mod 100=0)) or (year mod 400=0)) and not (year mod 4000 = 0);
  end;

var year:longint;
    days:integer;

begin
  write('Enter the year: '); read(year);
  if isleapyear(year) then days := 366 else days := 365;
  writeln('There are ',days,' days in the year ',year,'.');
end.