x = gets.strip.to_i

if x < 100
  puts 0
  exit
end

y = 0

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|
            y = 100 * i + 101 * j + 102 * k + 103 * l + 104 * m + 105 * n
            if x == y
              puts 1
              exit
            elsif x < y
              break
            end
          end
          break if x < y
        end
        break if x < y
      end
      break if x < y
    end
    break if x < y
  end
end

puts 0

