# frozen_string_literal: true

x = gets.to_i

a = (100..105).to_a

dp = Array.new(7) { Array.new(100010) { false }}
dp[0][0] = true
0.upto(5) 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
if dp[6][x]
  puts 1
else
  puts 0
end
