import sys

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)



X = int(eval(input()))



l = []

for i in range(1001):

    l.extend(list(range(i*100, 105*i+1)))





if X in l:

    print((1))

else:

    print((0))

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)



X = int(eval(input()))



for i in range(100000):

    if 100 * i <= X <= 100 * i + 5 * i:

        print((1))

        exit()



print((0))

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
X = int(eval(input()))
l = []
for i in range(1001):
    l.extend(list(range(i * 100, 105 * i + 1)))
if X in l:
    print((1))
else:
    print((0))

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
X = int(eval(input()))
for i in range(100000):
    if 100 * i <= X <= 100 * i + 5 * i:
        print((1))
        exit()
print((0))

-l = [] -for i in range(1001): -    l.extend(list(range(i * 100, 105 * i + 1))) -if X in l: -    print((1)) -else: -    print((0)) +for i in range(100000): +    if 100 * i <= X <= 100 * i + 5 * i: +        print((1)) +        exit() +print((0))