import sys

import numpy as np

sys.setrecursionlimit(10 ** 9)



stdin = sys.stdin

 

ri = lambda: int(rs())

rl = lambda: list(map(int, stdin.readline().split()))

rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces



X = ri()

q, r = divmod(X, 100)

bool = True

if q * 5 < r:

    bool = False

elif X > 105 * 10 ** 6:

    X -= 105 * 10 ** 6

    #パソコン使い果たす

    q, r = divmod(X, 100)

    if q * 4 < r:

        bool = False

    elif X > 104 * 10 ** 6:

        X -= 104 * 10 ** 6

        q, r = divmod(X, 100)

        if q * 3 < r:

            bool = False

        elif X > 103 * 10 ** 6:

            X -= 103 * 10 ** 6

            q, r = divmod(X, 100)

            if q * 2 < r:

                bool = False

            elif X > 102 * 10 ** 6:

                X -= 102 * 10 ** 6

                #クッキー使い果たす

                q, r = divmod(X, 100)

                if q * 1 < r:

                    bool = False

                elif X > 101 * 10 ** 6:

                    X -= 101 * 10 ** 6

                    #サンドイッチ使い果たす

                    q, r = divmod(X, 100)

                    if q * 0 < r:

                        bool = False

                    if X > 100 * 10 ** 6:

                        #おにぎり使い果たす 数が多すぎる

                        bool = False

                        

print((1 if bool else 0))



import sys



stdin = sys.stdin

 

ri = lambda: int(rs())

rl = lambda: list(map(int, stdin.readline().split()))

rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces



X = ri()

q, r = divmod(X, 100)

bool = True

if q * 5 < r:

    bool = False

print((1 if bool else 0))



import sys
import numpy as np

sys.setrecursionlimit(10**9)
stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces
X = ri()
q, r = divmod(X, 100)
bool = True
if q * 5 < r:
    bool = False
elif X > 105 * 10**6:
    X -= 105 * 10**6
    # パソコン使い果たす
    q, r = divmod(X, 100)
    if q * 4 < r:
        bool = False
    elif X > 104 * 10**6:
        X -= 104 * 10**6
        q, r = divmod(X, 100)
        if q * 3 < r:
            bool = False
        elif X > 103 * 10**6:
            X -= 103 * 10**6
            q, r = divmod(X, 100)
            if q * 2 < r:
                bool = False
            elif X > 102 * 10**6:
                X -= 102 * 10**6
                # クッキー使い果たす
                q, r = divmod(X, 100)
                if q * 1 < r:
                    bool = False
                elif X > 101 * 10**6:
                    X -= 101 * 10**6
                    # サンドイッチ使い果たす
                    q, r = divmod(X, 100)
                    if q * 0 < r:
                        bool = False
                    if X > 100 * 10**6:
                        # おにぎり使い果たす 数が多すぎる
                        bool = False
print((1 if bool else 0))

import sys

stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces
X = ri()
q, r = divmod(X, 100)
bool = True
if q * 5 < r:
    bool = False
print((1 if bool else 0))

-import numpy as np -sys.setrecursionlimit(10**9) -elif X > 105 * 10**6: -    X -= 105 * 10**6 -    # パソコン使い果たす -    q, r = divmod(X, 100) -    if q * 4 < r: -        bool = False -    elif X > 104 * 10**6: -        X -= 104 * 10**6 -        q, r = divmod(X, 100) -        if q * 3 < r: -            bool = False -        elif X > 103 * 10**6: -            X -= 103 * 10**6 -            q, r = divmod(X, 100) -            if q * 2 < r: -                bool = False -            elif X > 102 * 10**6: -                X -= 102 * 10**6 -                # クッキー使い果たす -                q, r = divmod(X, 100) -                if q * 1 < r: -                    bool = False -                elif X > 101 * 10**6: -                    X -= 101 * 10**6 -                    # サンドイッチ使い果たす -                    q, r = divmod(X, 100) -                    if q * 0 < r: -                        bool = False -                    if X > 100 * 10**6: -                        # おにぎり使い果たす 数が多すぎる -                        bool = False