{-------------------------------
 Opredelit,est li cifra 0 sredi
 pervih treh cifr v drobnoy
 chasti zadannoo polojitelnogo
 vewestvennogo chisla.
 -------------------------------
  # Max Tkachenko # Group 112 #
 -------------------------------
}

Program task_3_29___D(input,output);

 var
  a : real;
  res : boolean;

 begin
  writeln('Input A :');
   readln(a);

     a := (a - round(a)) + 0.0001;

     {
      Pribavlaem 0.0001 dla togo,4to bi pravilno srabotalo okruglenie
      Programma ras4itana na 3 znaka posle to4ti.
     }


    res := ( trunc(a * 10) mod 10 = 0) or ( trunc(a * 100) mod 10 = 0) or (trunc(a * 1000) mod 10 = 0);

   writeln(res);
  readln;
 end.