program Abs; var num: integer; begin readln(num); if num mod 5 = 0 then writeln(1) else writeln(0); end.