lines = $stdin.read
array = lines.split("\n")
X = array[0].to_i

COINS = [100, 101, 102, 103, 104, 105]

def coin(amount,kind,coins)

  coins = [0].concat(coins)
  dp = Array.new(kind+1).map{Array.new(amount+1, 0)}
  dp.each{|row| row[0] = 1}

  for i in 1..kind
    for j in 1..amount
      dp[i][j] = dp[i][j - coins[i]] + dp[i-1][j]
    end
  end
  dp
end


dp = coin(X,COINS.length,COINS)
if dp[COINS.length-1][X] > 0
  puts 1
else
  puts 0
end
