inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
X = inp.shift() * 1
x = ~~(X / 100)
y = X % 100
f = 0
for (i=0; i<=y; i++) {
for (j=0; j<=y; j++) {
for (k=0; k<=y; k++) {
for (l=0; l<=y; l++) {
    m = y-(i*5+j*4+k*3+l*2)
    n = x-(i+j+k+l+m)
    if (m >= 0 && n>=0) {
        f = 1
        break;
    }
}
if (f) break;
}
if (f) break;
}
if (f) break;
}
console.log(f)
