X = STDIN.gets.chomp.to_i

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

combination = []

prices.length.times do |i|
    combination << prices.combination(i+1).map{ |i| i.inject(:+) }
end

if combination.flatten.select{ |i| i == X }.length == 0
    puts 0
else
    puts 1
end