X = int(eval(input()))

C = 1000000



output = []

for c in range(C):

    if (c*100) <= X <= (c*105):

        output.append(1)

    else:

        output.append(0)

if max(output):

  print("1")

else:

  print("0")
def one_int():

    return int(eval(input()))



N=one_int()

num=int(N/100) 

amari = N % 100

if num*5 < amari:

    print((0))

else:

    print((1))
X = int(eval(input()))
C = 1000000
output = []
for c in range(C):
    if (c * 100) <= X <= (c * 105):
        output.append(1)
    else:
        output.append(0)
if max(output):
    print("1")
else:
    print("0")

def one_int():
    return int(eval(input()))


N = one_int()
num = int(N / 100)
amari = N % 100
if num * 5 < amari:
    print((0))
else:
    print((1))

-X = int(eval(input())) -C = 1000000 -output = [] -for c in range(C): -    if (c * 100) <= X <= (c * 105): -        output.append(1) -    else: -        output.append(0) -if max(output): -    print("1") +def one_int(): +    return int(eval(input())) + + +N = one_int() +num = int(N / 100) +amari = N % 100 +if num * 5 < amari: +    print((0)) -    print("0") +    print((1))