x = gets.chomp.to_i

if x < 100
  puts 0
  exit
end

futaketa = x % 100
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 ![one, two, three, four, five].all?{|v| v==0}
            futaketa_sum = (one*1 + two*2 + three*3 + four*4 + five*5)
            if futaketa == futaketa_sum % 100
              sum_val = one*101 + two*102 + three*103 + four*104 + five*105
              if (x - sum_val) >= 0 && (x - sum_val) % 100 == 0
                puts "#{one} #{two} #{three} #{four} #{five}"
                puts 1
                exit
              end
            end
          end
        end
      end
    end
  end
end

puts 0