#!/usr/bin/env python3

#三井住友信託銀行プログラミングコンテスト2019 C



import sys

import math

from bisect import bisect_right as br

from bisect import bisect_left as bl

sys.setrecursionlimit(1000000)

from heapq import heappush, heappop,heappushpop

from collections import defaultdict

from itertools import accumulate

from collections import Counter

from collections import deque

from operator import itemgetter

from itertools import permutations

mod = 10**9 + 7

inf = float('inf')

def I(): return int(sys.stdin.readline())

def LI(): return list(map(int,sys.stdin.readline().split()))



x = I()

y,z = divmod(x,100)

if y*5 >= z:

    print((1))

else:

    print((0))
#!/usr/bin/env python3



import sys

import math

from bisect import bisect_right as br

from bisect import bisect_left as bl

sys.setrecursionlimit(2147483647)

from heapq import heappush, heappop,heappushpop

from collections import defaultdict

from itertools import accumulate

from collections import Counter

from collections import deque

from operator import itemgetter

from itertools import permutations

mod = 10**9 + 7

inf = float('inf')

def I(): return int(sys.stdin.readline())

def LI(): return list(map(int,sys.stdin.readline().split()))



x = I()

y = x // 100

z = x % 100

if 0 <= z <= 5*y:

    print((1))

else:

    print((0))

#!/usr/bin/env python3
# 三井住友信託銀行プログラミングコンテスト2019 C
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl

sys.setrecursionlimit(1000000)
from heapq import heappush, heappop, heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations

mod = 10**9 + 7
inf = float("inf")


def I():
    return int(sys.stdin.readline())


def LI():
    return list(map(int, sys.stdin.readline().split()))


x = I()
y, z = divmod(x, 100)
if y * 5 >= z:
    print((1))
else:
    print((0))

#!/usr/bin/env python3
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl

sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop, heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations

mod = 10**9 + 7
inf = float("inf")


def I():
    return int(sys.stdin.readline())


def LI():
    return list(map(int, sys.stdin.readline().split()))


x = I()
y = x // 100
z = x % 100
if 0 <= z <= 5 * y:
    print((1))
else:
    print((0))

-# 三井住友信託銀行プログラミングコンテスト2019 C -sys.setrecursionlimit(1000000) +sys.setrecursionlimit(2147483647) -y, z = divmod(x, 100) -if y * 5 >= z: +y = x // 100 +z = x % 100 +if 0 <= z <= 5 * y: