X = gets.to_i
T = X/100
r = X % 100
ans = '0'
(0..T).each do |a|
  (0..T).each do |b|
    (0..T).each do |c|
      (0..T).each do |d|
        (0..T).each do |e|
          (0..T).each do |f|
            if r === a+b+c+d+e+f              
              ans = '1'
              break
            end
          end
        end
      end
    end
  end
end
puts ans