x = gets.chomp.to_i

if x < 100
  puts 0
  exit
end

futaketa = (x.to_s[-2] + x.to_s[-1]).to_i
if futaketa == 0
  puts 1
  exit
end


(futaketa/1).times do |one|
  (futaketa/2).times do |two|
    if (one*1 + two*2) > futaketa
      break
    end
    (futaketa/3).times do |three|
      if (one*1 + two*2 + three*3) > futaketa
        break
      end
      (futaketa/4).times do |four|
        if (one*1 + two*2 + three*3 + four*4) > futaketa
          break
        end
        (futaketa/5).times do |five|
          if futaketa == (one*1 + two*2 + three*3 + four*4 + five*5) && ![one, two, three, four, five].all?{|v| v==0}
            sum_val = one*101 + two*102 + three*103 + four*104 + five*105
            if (x.to_i - sum_val) >= 0 && (x.to_i - sum_val) % 100 == 0
              puts 1
              exit
            end
          end
        end
      end
    end
  end
end

puts 0