X = int(input())

dp = [False for _ in range(100001)]

dp[0] = True

for i in range(100,106):

    dp[i] = True

for i in range(107, X + 1):

    if dp[i - 100] == True or dp[i - 101] == True or dp[i - 102] == True\

        or dp[i - 103] == True or dp[i - 104] == True or dp[i - 105] == True:

        dp[i] = True



if dp[X] == True:

    print(1)

else:

    print(0)

import sys

x = int(eval(input()))



for i in range(1000):

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

        print("1")

        sys.exit(0)

print("0")
X = int(input())
dp = [False for _ in range(100001)]
dp[0] = True
for i in range(100, 106):
    dp[i] = True
for i in range(107, X + 1):
    if (
        dp[i - 100] == True
        or dp[i - 101] == True
        or dp[i - 102] == True
        or dp[i - 103] == True
        or dp[i - 104] == True
        or dp[i - 105] == True
    ):
        dp[i] = True
if dp[X] == True:
    print(1)
else:
    print(0)

import sys

x = int(eval(input()))
for i in range(1000):
    if 100 * i <= x <= 105 * i:
        print("1")
        sys.exit(0)
print("0")

-X = int(input()) -dp = [False for _ in range(100001)] -dp[0] = True -for i in range(100, 106): -    dp[i] = True -for i in range(107, X + 1): -    if ( -        dp[i - 100] == True -        or dp[i - 101] == True -        or dp[i - 102] == True -        or dp[i - 103] == True -        or dp[i - 104] == True -        or dp[i - 105] == True -    ): -        dp[i] = True -if dp[X] == True: -    print(1) -else: -    print(0) +import sys + +x = int(eval(input())) +for i in range(1000): +    if 100 * i <= x <= 105 * i: +        print("1") +        sys.exit(0) +print("0")