x = gets.to_i
under_two = x % 100
over_two = x / 100
cnt = 1e5.to_i
(0..9).each do |i|
  (0..9).each do |j|
    (0..9).each do |k|
      (0..9).each do |l|
        (0..9).each do |m|
          if i + 2*j + 3*k + 4*l + 5*m == under_two
            cnt = [cnt , i+j+k+l+m].min
          end
        end
      end
    end
  end
end

puts cnt > over_two ? "0" : "1"