x = gets.strip.to_i

if x < 100
  puts '0'
  exit
end

1000.times do |i|
  (1000 - i).times do |j|
    (1000 - i - j).times do |k|
      (1000 - i - j - k).times do |l|
        (1000 - i - j - k - l).times do |m|
          (1000 - i - j - k - l - m).times do |n|
            if x == 100 * i + 101 * j + 102 * k + 103 * l + 104 * m + 105 * n
              puts '1'
              exit
            end
          end
        end
      end
    end
  end
end

puts '0'