from itertools import combinations

import sys

"""

10の６条

ijklm

"""



X = int(eval(input()))

P = [1, 2, 3, 4, 5]



if 1 <= X <= 99:

    print("0")

    sys.exit(0)



a = X % 100

b = X // 100



if a == 0:

    print("1")

    sys.exit(0)



for i in range(20):

    for j in range(25):

        for k in range(34):

            for l in range(50):

                ans = 5 * i + 4 * j + 3 * k + 2 * l

                if a -ans <= b - (i + j + k + l) and a - ans >= 0:

                    print("1")

                    sys.exit(0)

print('0')
X = int(eval(input()))

flag = False

for i in range(X + 1):

    if 100 * i <= X <= 105 * i:

        flag = True

if flag:

    print((1))

else:

    print((0))
from itertools import combinations
import sys

"""
10の６条
ijklm
"""
X = int(eval(input()))
P = [1, 2, 3, 4, 5]
if 1 <= X <= 99:
    print("0")
    sys.exit(0)
a = X % 100
b = X // 100
if a == 0:
    print("1")
    sys.exit(0)
for i in range(20):
    for j in range(25):
        for k in range(34):
            for l in range(50):
                ans = 5 * i + 4 * j + 3 * k + 2 * l
                if a - ans <= b - (i + j + k + l) and a - ans >= 0:
                    print("1")
                    sys.exit(0)
print("0")

X = int(eval(input()))
flag = False
for i in range(X + 1):
    if 100 * i <= X <= 105 * i:
        flag = True
if flag:
    print((1))
else:
    print((0))

-from itertools import combinations -import sys - -""" -10の６条 -ijklm -""" -P = [1, 2, 3, 4, 5] -if 1 <= X <= 99: -    print("0") -    sys.exit(0) -a = X % 100 -b = X // 100 -if a == 0: -    print("1") -    sys.exit(0) -for i in range(20): -    for j in range(25): -        for k in range(34): -            for l in range(50): -                ans = 5 * i + 4 * j + 3 * k + 2 * l -                if a - ans <= b - (i + j + k + l) and a - ans >= 0: -                    print("1") -                    sys.exit(0) -print("0") +flag = False +for i in range(X + 1): +    if 100 * i <= X <= 105 * i: +        flag = True +if flag: +    print((1)) +else: +    print((0))