X = gets.chomp.to_i

n, m = X.divmod(100)
as = [5, 4, 3, 2, 1]
a = as.shift
n.times do
  if m >= a
    m -= a
  elsif as.empty?
    break
  else
    a = as.shift
  end
end
if m.zero?
  puts 1
else
  puts 0
end
