x = gets.strip.to_i

y = 0

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

puts 0
