# frozen_string_literal: true

x = gets.to_i

a = (100..105).to_a * (x / 100)

dp = Array.new(a.size + 10) { Array.new(100010) { false }}
dp[0][0] = true
0.upto(a.size - 1) do |i|
  0.upto(x) do |j|
    dp[i + 1][j] |= dp[i][j]
    if (j >= a[i])
      dp[i + 1][j] |= dp[i][j - a[i]]
    end
  end
end

#p dp
6.upto(a.size + 1) do |i|
  if dp[i][x]
    puts 1
    exit
  end
end
puts 0
