def sumitb2019_c
    x = gets.chomp.to_i

    if x < 100
        puts 0
        exit
    else
        yen = [100, 101, 102, 103, 104, 105]
        for y in yen
            if x % y == 0
                puts 1
                exit
            end
        end
    end

    y = x.to_s[-2..-1].to_i
    z = (y - 1) / 5 + 1
    puts (x - z*100 > 0) ? 1 : 0
end

sumitb2019_c