def a(i)
  return 0 if i < 100 || i > 100000
  r = i - 100 * i.div(100)
  1.upto(i.div(100)) do |n|
    [0, 1, 2, 3, 4, 5].repeated_combination(n) do |c|
      return 1 if r == c.sum
    end
  end
  0
end
p a(gets.to_i)