x = gets.to_i
onigiri = 0
while onigiri * 100 <= x
  sandwich = 0
  while sandwich * 101 + onigiri * 100 <= x
    kukki = 0
    while kukki * 102 + sandwich * 101 + onigiri * 100 <= x
      cake = 0
      while cake * 103 + kukki * 102 + sandwich * 101 + onigiri * 100 <= x
        candy = 0
        while candy * 104 + cake * 103 + kukki * 102 + sandwich * 101 + onigiri * 100 <= x
          if (x - candy * 104 - cake * 103 - kukki * 102 - sandwich * 101 - onigiri * 100) % 105 == 0
            puts 1
            exit
          end
          candy += 1
        end
        cake += 1
      end
      kukki += 1
    end
    sandwich += 1
  end
  onigiri += 1
end
puts 0