X = gets.to_i
result = 0

if (100..105).any? { |a| X % a == 0 }
    result = 1
end

if result == 0
    ((X / 105)..(X / 100)).each do |i|
        n = X - 100 * i
        next if n > 5 * i
  
        5.step(1, -1) do |j|
            next if j > n
            k = n / j
            
            n -= j * k
            i -= k
            
            if n == 0
                result = 1
                break
            end
        end
  
        break if result == 1
    end
end

puts result