import itertools

def modelAnswer(X:int):

   lis = [i for i in range(100,106)]

   C = X//100

   for p in itertools.combinations_with_replacement(lis,C):

      if(sum(p)==X):

         return 1

   return 0



def main():

   X = int(eval(input()))

   print((modelAnswer(X)))



if __name__ == '__main__':

   main()
def solve(X:int) -> int:

    if(X < 100):return 0

    first = int(str(X)[-1])

    seccond = int(str(X)[-2])

    ans = 0

    if(first >= 6):

        ans += first + 200

    elif(first > 0):

        ans += first + 100

    ans += (seccond * 2) * 105

    return 1 if(ans <= X) else 0





def main():

    X = int(eval(input()))

    print((solve(X)))



if __name__ == "__main__":

    main()





import itertools


def modelAnswer(X: int):
    lis = [i for i in range(100, 106)]
    C = X // 100
    for p in itertools.combinations_with_replacement(lis, C):
        if sum(p) == X:
            return 1
    return 0


def main():
    X = int(eval(input()))
    print((modelAnswer(X)))


if __name__ == "__main__":
    main()

def solve(X: int) -> int:
    if X < 100:
        return 0
    first = int(str(X)[-1])
    seccond = int(str(X)[-2])
    ans = 0
    if first >= 6:
        ans += first + 200
    elif first > 0:
        ans += first + 100
    ans += (seccond * 2) * 105
    return 1 if (ans <= X) else 0


def main():
    X = int(eval(input()))
    print((solve(X)))


if __name__ == "__main__":
    main()

-import itertools - - -def modelAnswer(X: int): -    lis = [i for i in range(100, 106)] -    C = X // 100 -    for p in itertools.combinations_with_replacement(lis, C): -        if sum(p) == X: -            return 1 -    return 0 +def solve(X: int) -> int: +    if X < 100: +        return 0 +    first = int(str(X)[-1]) +    seccond = int(str(X)[-2]) +    ans = 0 +    if first >= 6: +        ans += first + 200 +    elif first > 0: +        ans += first + 100 +    ans += (seccond * 2) * 105 +    return 1 if (ans <= X) else 0 -    print((modelAnswer(X))) +    print((solve(X)))