X = gets.to_i

max_n = X/100

(0..max_n).each do |i1|
    m1 = i1 * 100
    (0..(max_n-i1)).each do |i2|
        m2 = i2 * 101
        (0..(max_n-i1-i2)).each do |i3|
            m3 = i3 * 102
            (0..(max_n-i1-i2-i3)).each do |i4|
                m4 = i4 * 103
                (0..(max_n-i1-i2-i3-i4)).each do |i5|
                    m5 = i5 * 104
                    if m1 + m2 + m3 + m4 + m5 == X
                        puts "1"
                        exit
                    end
                end            
            end        
        end    
    end
end

puts "0"