x = int(eval(input()))

n = x//100 + 1

 

for i in range(n):

  for j in range(n):

     for k in range(n):

         for l in range(n):

             for m in range(n):

                 c = 100*i + 101*j + 102*k + 103*l + 104*m

                 if x >= c:

                    t = x-c

                

                    if t%105 == 0:

                        print((1))

                        exit()

                    

print((0))
x = int(eval(input()))

n = x//100



if 100*n <= x and x <= 105*n:

  print((1))

else:

  print((0))
x = int(eval(input()))
n = x // 100 + 1
for i in range(n):
    for j in range(n):
        for k in range(n):
            for l in range(n):
                for m in range(n):
                    c = 100 * i + 101 * j + 102 * k + 103 * l + 104 * m
                    if x >= c:
                        t = x - c
                        if t % 105 == 0:
                            print((1))
                            exit()
print((0))

x = int(eval(input()))
n = x // 100
if 100 * n <= x and x <= 105 * n:
    print((1))
else:
    print((0))

-n = x // 100 + 1 -for i in range(n): -    for j in range(n): -        for k in range(n): -            for l in range(n): -                for m in range(n): -                    c = 100 * i + 101 * j + 102 * k + 103 * l + 104 * m -                    if x >= c: -                        t = x - c -                        if t % 105 == 0: -                            print((1)) -                            exit() -print((0)) +n = x // 100 +if 100 * n <= x and x <= 105 * n: +    print((1)) +else: +    print((0))