inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
X = inp.shift() * 1
b = [100,101,102,103,104,105]
f = 0
for (i=0; i<64; i++) {
    c = 0b11111 && i
    a = 0
    for (j=0; j<6; j++) {
        if (c>>j & 1) {
            a += b[j]
        }
    }
    if (X % a == 0) {
        f = 1
    }
}
console.log(f)
