Problem:
 Score: 300 points    Problem Statement  AtCoder Mart sells 1000000 of each of the six items below:   Riceballs, priced at 100 yen (the currency of Japan) each  Sandwiches, priced at 101 yen each  Cookies, priced at 102 yen each  Cakes, priced at 103 yen each  Candies, priced at 104 yen each  Computers, priced at 105 yen each   Takahashi wants to buy some of them that cost exactly X yen in total.
Determine whether this is possible. (Ignore consumption tax.)      Constraints   1 \leq X \leq 100000  X is an integer.         Input  Input is given from Standard Input in the following format:  X       Output  If it is possible to buy some set of items that cost exactly X yen in total, print 1 ; otherwise, print 0 .        Sample Input 1 615      Sample Output 1 1  For example, we can buy one of each kind of item, which will cost 100+101+102+103+104+105=615 yen in total.       Sample Input 2 217      Sample Output 2 0  No set of items costs 217 yen in total.

Solution (Python):
dp = [0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0]
X=int(input())
rem = X%100
div = int(X/100)
if div>=dp[rem]:
  print('1')
else:
  print('0')

Solution (Python):
import sys
X=int(input()) 

if X >= 2000:
  print(1)
  sys.exit()

n = X//100
m = X%100
if n*5 >= m:
  print(1)
else:
  print(0)

Solution (Python):
m = int(input())
f = [0] * (m + 1)
f[0] = 1
for x in range(100, 106):
  for i in range(x, m + 1):
    f[i] = max(f[i - x], f[i])
print(f[m])

Solution (Python):
x = int(input())
p = x//100
q = x%100
print(1 if p*5>=q else 0)

Solution (Python):
x=int(input())
ma=x//100
mi=x//105+int(bool(x%105))
check=False
for m in range(mi,ma+1):
    res = x-100*m
    if res<=5*m:
        check=True
        break
print(int(check))

Solution (Python):
X = input()
if int(X) < 100:
    print(0)
    exit()
x = int(X[-2] + X[-1])
X = (int(X)-x)//100
if x > 5*X:
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())
count = 0
while X > 0:
    X -= 100
    count += 1
    if 0 <= X <= count*5:
        print(1)
        exit()
print(0)

Solution (Python):
goods = [105, 104, 103, 102, 101]


def calc(n: int) -> list:
    n = n % 100
    res = []
    for c in goods:
        c = c % 100
        q = n // c
        n = n % c
        res.append(q)
    return res


def main():
    x = int(input())
    num = calc(x)
    y = 0
    for p, q in zip(goods, num):
        y += p*q
    if y <= x:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
import sys


def main():
    
    money = int(input())

    answer = '0'

    for i in range(1, 1001):
        low = i * 100
        high = i * 105
        if low <= money <= high:
            answer = '1'

    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
a = X//100
b = X - 100*a
if b <= 5*a:
    print(1)
else:
    print(0)

Solution (Python):
X=int(input())


N=int(X/100)

if 5*N >= X-100*N:
  print(1)
else:
  print(0)

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    X = int(input())
    if X >= 2000:
        print(1)
        return
    d, m = divmod(X, 100)
    if m <= d*5:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())

a = x%100
b = x//100

count = 0
number = 5
while 1:
    if a == 0:
        break
    count += a//number
    a = a%number
    number -= 1

if count <= b:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())

kosuu = x // 100
hasuu = x % 100

if hasuu <= kosuu * 5:
    print(1)
else:
    print(0)

Solution (Python):
n=int(input())
k=n//100
m=n%100
a=[0,1,2,3,4,5]
i=5
cnt=0
while True:
    if cnt>k:
        print(0)
        exit()
    if m==0:
        print(1)
        exit()
    if m>=a[i]:
        
        m-=a[i]
        cnt+=1
    else:
        i-=1

Solution (Python):
n = int(input())
l = [0] * (n + 110)
m = [100, 101, 102, 103, 104, 105]

for x in range(100, 106):
    l[x] = 1

for x in range(100, n + 1):
    if l[x] == 1:
        for y in m:
            l[x + y] = 1

print(1 if l[n] == 1 else 0)

Solution (Python):
x = int(input())

n = x // 100

while 1:
    if n * 100 <= x <= n * 105:
        print(1)
        exit()
    elif n * 100 > x:
        print(0)
        exit()
    n += 1

Solution (Python):
X = int(input())
H = X // 100
L = X % 100
print(1 if L <= 5 * H else 0)

Solution (Python):
from sys import stdin
X = int(stdin.readline().rstrip())
a = X // 100
b = X % 100
if X < 100:
    print(0)
else:
  if a*5 >= b:
      print(1)
  else:
      print(0)

Solution (Python):
x = int(input())

li = []
for i in range(1000):
    li.append([100*i,105*i])

for i,j in li:
    if i <= x and x <= j:
        print(1)
        exit()

print(0)

Solution (Python):
X = int(input())
dp = [1]+[0]*X
if X<100:
    print(0)
    exit()
for i in range(100,X+1):
    if 100 <= i <= 105:
        dp[i] = 1
    elif sum(dp[i-105:i-99]) >= 1:
        dp[i] = 1
if dp[X] == 1:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())

can = set()
can.add(0)

for i in range(1, 2100):
    for k in range(100, 105+1):
        if (i-k) in can:
            can.add(i)
            break
if (X in can) or (X >= 2100) :
    print(1)
else:
    print(0)

Solution (Python):
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
X = int(input())
if X <2000 :
    count = X//100
    if X%100 > count*5 :
        print(0)
    else:
        print(1)
else:
    print(1)

Solution (Python):
x = int(input())
ls = []
for i in range(1,21):
    for j in range(i*5+1):
        ls.append(i * 100 + j)
if x in ls or x >= 2100:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())

for i in range(1,1001):
  
    if 0 <= X-100*i <= 5*i:
        print(1)
        break
else:
    print(0)

Solution (Python):
x = int(input())
a = x%100
b = x//100
if (a%5 == 0):
    a = a//5
else:
    a = a//5+1
if (a <= b):
    print(1)
else:
    print(0)

Solution (Python):
import math

X = int(input())

c = int(X/100)
a = X%100

c_ = math.ceil(a / 5)

if c_ <= c:
  print(1)
else:
  print(0)

Solution (Python):
def c():
    x = int(input())
    if x < 100:
        return 0
    
    tmp = int(str(x)[-2:])
    N = x // 100
    lower = 100*N
    upper = 105*N
    if lower <= x <= upper:
        return 1
    else:
        return 0


if __name__ == "__main__":
    ans = c()
    print(ans)

Solution (Python):
import math
x = int(input())
res = False
for i in range(math.floor(x / 105), math.floor(x / 100) + 1):
    target = x - 100 * i
    if target < 0:
        continue
    if 0 <= target <= 5 * i:
        res = True
        break
    else:
        continue
if res:
    print("1")
else:
    print("0")

Solution (Python):
x=int(input())
buy=x//100
if x%100<=buy*5:
	print(1)
else:
	print(0)

Solution (Python):
x=int(input())
dp=[-1]*(x+1)
dp[0]=1
for i in range(1,x+1):
  for j in range(100,106):
    if i-j>=0:
      if dp[i-j]==1:
        dp[i]=1
if dp[x]==1:
  print(1)
else:
  print(0)

Solution (Python):
x=int(input())
right=x//100
x-=right*100

def count(n):
    tmp=0
    tmp+=n//5
    n-=tmp*5
    if n!=0:
        tmp+=1
    return tmp

if count(x)<=right:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())

if x>=2000:
  print(1)
else:
  n=x//100
  if 5*n < x-n*100:
    print(0)
  else:
    print(1)

Solution (Python):
x = int(input())

n = x//100
a = x%100

flag = False
while(1):
    if a <= n*5:
        flag = True
        break
    n -= 20
    a += 100
    if n <= 0:
        break

if flag:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())

tmp = x // 100
flag = 0
for i in range(tmp, 0, -1):
    if (x - i*100) <= 5 * i:
        flag = 1
        break

if flag:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
if X//100 * 5 >= X%100:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
p, mod = divmod(x,100)
ans = 1
for i in reversed(range(1,6)):
	cnt, mod = divmod(mod, i)
	p -= cnt
	if p < 0:
		ans = 0
		break

print(ans)

Solution (Python):
x = int(input())
A = []
for i in range(1,1005):
    A.append([100*i, 105*i])

ans = 0
for i in range(len(A)):
    if A[i][0] <= x <= A[i][1]:
        ans = 1
if ans==1:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
y = x % 100
z = x // 100

if z * 5 >= y:
    print(1)
else:
    print(0)

Solution (Python):

X=int(input())

x=X%100
i=0

for j in range(5,0,-1):
    i+=x//j
    x=x%j
if X//100>=i:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
if ((X // 100) * 5 < X % 100):
    print(0)
else:
    print(1)

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    X = II()
    dp = [-1] * (X+106)
    dp[0] = 0
    V = [100,101,102,103,104,105]
    for i in range(X):
            if dp[i] != -1:
                for v in V:
                    dp[i+v] = 1
    if dp[X] == 1:
        print(1)
    else:
        print(0)
    


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    X = int(input())
    num = X // 100
    if X % 100 > 5 * num:
        print(0)
    else:
        print(1)
main()

Solution (Python):
x = int(input())

if x >= 2000: print(1)
else:
    a = x // 100
    b = x - (a * 100)
    print(int(a * 5 >= b))

Solution (Python):
x = int(input())
sum = 0

n = x // 100
m = x - n*100

for i in reversed(range(1, 6)):
    sum += m // i
    m = m % i

if sum <= n:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
if x < 105:
	if x == 100 or x == 101 or x == 102 or x == 103 or x == 104:
		print(1)
	else:
		print(0)
	exit(0)

dp = [False]*(x+1)
dp[0] = True
dp[100] = True
dp[101] = True
dp[102] = True
dp[103] = True
dp[104] = True
dp[105] = True
for i in range(106,x+1):
	dp[i] =  dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]
if dp[x]:
	print(1)
else:
	print(0)

Solution (Python):
x = int(input())
n = x // 100
kingaku = x - n * 100
if kingaku <= n * 5:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())

for i in range(X//105, X//100+1):
    rest = X - 100*i
    if 0 <= rest <= 5*i:
        print(1)
        break
else:
    print(0)

Solution (Python):
x = int(input())
dp = [0 for i in range(100003)]
for i in range(100,106):
    dp[i] = 1

for i in range(107,100002):
    for j in range(6):
        if dp[i-(100+j)] == 1:
            dp[i] = 1


print(dp[x])

Solution (Python):
from collections import defaultdict
import sys
sys.setrecursionlimit(2000)
dic = defaultdict(list)
X = int(input())
def check(n):
  if n==100 or n==101 or n==102 or n==103 or n==104 or n==105:
    return 1
  elif n<100:
    return 0
  elif dic[n]!=[]:
    return dic[n]
  else:
    for i in range(100,106):
      if check(n-i):
        dic[n-i]=1
        return 1
      else:
        dic[n-i]=0
    return 0
if check(X)==1:
  print(1)
else:
  print(0)

Solution (Python):


import sys
import math
import collections


x=int(input())







if(x>2100):
	print(1)
	sys.exit()

tmpa=x//100
tmpb=x%100
if(tmpb<=tmpa*5):
	print(1)
else:
	print(0)
sys.exit()

Solution (Python):
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

x = inn()
pmax = x//100
for p in range(pmax+1):
    r = x - 100*p
    if r <= 5*p:
        print(1)
        exit()
print(0)

Solution (Python):
x = int(input())

n = x//100
print(1 if x <= 105*n else 0)

Solution (Python):
n = int(input())
a = n//100
if a*100 <= n <= a*105:
    print('1')
else:
    print('0')

Solution (Python):
X = int(input())
tmp = X % 100
tmp2 = X // 100
if tmp <= tmp2 * 5:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
N = X // 100
n = X % 100

if N == 0:
  print(0)
elif n / N > 5:
  print(0)
else:
  print(1)

Solution (Python):
X = int(input())
n = X // 100
m = X % 100
if m <= 5*n:
    print(1)
else:
    print(0)

Solution (Python):
import math
import sys
x = int(input())

syou = x //100
r = x % 100
if syou * 5 >= r:
  print(1)
else:
  print(0)

Solution (Python):
X = int(input())

dp = [0] * (X + 1 + 105)
dp[0] = 1

for i in range(X):
  if dp[i] == 1:
    for j in range(100, 106):
      dp[i + j] = 1
print(dp[X])

Solution (Python):
def main():
    n=int(input())
    ary=[0]*100001
    ary[100]=1
    ary[101]=1
    ary[102]=1
    ary[103]=1
    ary[104]=1
    ary[105]=1

    for i in range(200,n+1):
        if ary[i-100]==1:
            ary[i]=1
        if ary[i-101]==1:
            ary[i]=1
        if ary[i-102]==1:
            ary[i]=1
        if ary[i-103]==1:
            ary[i]=1
        if ary[i-104]==1:
            ary[i]=1
        if ary[i-105]==1:
            ary[i]=1
    print(ary[n])
if __name__=='__main__':
    main()

Solution (Python):
x=int(input())
a=x%100
print(1 if -int(-a//5)<=x//100 else 0)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

X = int(input())

c = X//100
a = X%100

if (a-1)//5 + 1 <= c:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    x = input()
    for i1 in xrange(0, x + 1, 100):
        s1 = i1
        for i2 in xrange(0, x - s1 + 1, 101):
            s2 = s1 + i2
            for i3 in xrange(0, x - s2 + 1, 102):
                s3 = s2 + i3
                for i4 in xrange(0, x - s3 + 1, 103):
                    s4 = s3 + i4
                    for i5 in xrange(0, x - s4 + 1, 104):
                        s5 = s4 + i5
                        if (x - s5) % 105 == 0:
                            print 1
                            return
    print 0

main()

Solution (Python):
def main():
    n = int(input())

    extra = n % 100
    need = (extra + 4) // 5
    got = n // 100
    print(int(got >= need))

main()

Solution (Python):
X = int(input())
for i in range(10000):
    if 100*i <= X <=105*i:
        print(1)
        break
else:
    print(0)

Solution (Python):
x=int(input())
y=x//100
if x<=105*y:
  print("1")
else:
  print("0")

Solution (Python):
x = int(input())
k = x//100
r = x%100
if k  >= 20:
  print(1)
else:
  if r  <= k*5:
    print(1)
  else:
    print(0)

Solution (Python):
X = int(input())
n1 = X//100
n2 = (X+105-1)//105

if n1 < n2:
  print(0)
else:
  print(1)

Solution (Python):

x = int(input())
cnt = x//100

if x-cnt*100>cnt*5:
    print(0)
else:
    print(1)

Solution (Python):
x = int(input())

y = x % 100
if y % 5 == 0:
    num = y // 5
else:
    num = y // 5 + 1

if x >= (100 * num):
    print('1')
else:
    print('0')

Solution (Python):
n = int(input())

a = n // 100
b = n % 100
c = (b - 1) // 5 + 1

if a >= 20:
  print(1)
else:
  if a < c:
    print(0)
  else:
    print(1)

Solution (Python):

import sys


def solve(X: int):
    N = [0] * (X+1)
    for i in range(100, X+1):
        if 100 <= i <= 105:
            N[i] = 1
        else:
            s = sum(N[i-105:i-99])
            if s:
                N[i] = 1
    print(N[X])
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

a = N//100
b = N%100
if a >= 20 or b <= 5*a:
    print(1)
else:
    print(0)

Solution (Python):
X=int(input())

A=X//100
B=X%100

if X>=2000:
  print(1)
else:
  if A*5>=B:
    print(1)
  else:
    print(0)

Solution (Python):
n = int(input())
if n % 100 > 5 * (n // 100):
  print(0)
else:
  print(1)

Solution (Python):
x = int(input())

num = x//100
mod = x % 100

if mod > 5 * num:
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())

cando = [False for i in range(X+1)]
cando[0] = True
for i in range(X+1):
    if not cando[i]: continue
    for item in [100, 101, 102, 103, 104, 105]:
        if i + item <= X:
            cando[i+item] = True
print(int(cando[X]))

Solution (Python):
n=int(input())
a=n//100
b=n%100
if b<=5*a:
  print(1)
else:
  print(0)

Solution (Python):
from functools import lru_cache
import sys

sys.setrecursionlimit(1000000)

X = int(input())

@lru_cache(None)
def rec(x):
    if x == 0:
        return True
    if x < 0:
        return False
    return any(rec(x-100-d) for d in range(6))

print(1 if rec(X) else 0)

Solution (Python):
from math import ceil

x = int(input())
q, r = divmod(x, 100)
nb_need = ceil(r / 5)
if  q >= nb_need:
    print(1)
else:
    print(0)

Solution (Python):
N = int(input())
q, mod = divmod(N, 100)
print(1 if mod <= q * 5 else 0)

Solution (Python):
N = int(input())

x = N//100

if 105*x >= N:
    print(1)
else:
    print(0)

Solution (Python):
n=int(input())
x=n//100
y=n%100
print(1 if y<=x*5 else 0)

Solution (Python):
n = int(input())
if n >= 10000:
  print(1)
  exit()
item_num = n//100
hasu = int(str(n)[-2:])
if item_num*5 >= hasu:
  print(1)
else:
  print(0)

Solution (Python):
from sys import stdin


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())




x = intput()

h = x // 100

if x - h * 100 in range(5 * h + 1):
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
import math
A = X/100
B = X/105
print(1) if math.ceil(B) <= math.floor(A) else print(0)

Solution (Python):
dp = [0 for i in range(100001)]
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1
for i in range(106,100001):
    dp[i] = max(dp[i-100],dp[i-101],dp[i-102],dp[i-103],dp[i-104],dp[i-105])
X = int(input())
print(dp[X])

Solution (Python):
x = int(input())
nm = x//100


if nm * 5 >= x-(nm*100):
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
a = x // 100
b = x % 100
if a >= 20:
    print("1")
elif b <= a * 5:
    print("1")
else:
    print("0")

Solution (Python):
X = int(input())

num = X // 100
amari = X % 100

if amari <= 5 * num:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())

a = int(x/100)
b = x%100

if b%5 == 0:
  a=a+1
if a>=int(b/5)+1:
  print(1)
else:
  print(0)

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(X):
    for i in range(1, 1000000+1):
        if 100 * i <= X <= 105* i:
            return 1
    return 0


def main():
    X = read_int()
    print(slv(X))


if __name__ == '__main__':
    main()

Solution (Python):

from collections import deque
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = True

def index(a,b):
    return str(min(a,b)) + "," +  str(max(a, b))

def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


    x = II()
    y = x // 100
    if y*100 <= x <= y*100+y*5 or x >= 2000:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())

dp = [0] * (x + 1)
cost = [100, 101, 102, 103, 104, 105]

if x < 100:
    print('0')
elif x <= 105:
    print('1')
else:
    dp[0] = 1
    for _x in range(1, x + 1):
        for c in cost:
            if dp[_x - c] == 1:
                dp[_x] = 1
                continue

    if dp[-1]:
        print('1')
    else:
        print('0')

Solution (Python):
def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def f(num, s):
    if s > num * 5:
        return False

    return True


def main():
    X = int(input())
    num = X // 100
    while True:
        s = X - num * 100
        if f(num, s):
            print(1)
            return
        elif s > num * 5:
            print(0)
            return
        num -= 1


if __name__ == '__main__':
    main()

Solution (Python):
import sys; readline = sys.stdin.readline
from collections import deque

X = int(readline())

q = X // 100
r = X % 100

if r > 5 * q:
    print('0')
else:
    print('1')

Solution (Python):
X = int(input())

mn = X // 105
mx = (X + 99) // 100
ans = 0
for i in range(mn, mx+1, 1):
    if X >= i * 100 and X <= i * 105:
        ans = 1
        break

print(ans)

Solution (Python):
x = int(input())
for y in range(x // 100 + 2):
    t = x - y * 100
    if 0 <= t <= 5 * y:
        print('1')
        break
else:
    print(0)

Solution (Python):
N = int(input())
if N >= 2000:
    print(1)
else:
    x = N // 100
    if 100*x <= N <= 105*x:
        print(1)
    else:
        print(0)

Solution (Python):
X = int(input())
items = [100, 101, 102, 103, 104, 105]
lrs = []
for i in range(1,100001):
    l = 100 * i
    r = 105 * i
    lrs.append([l, r])
idx = X // 100
if idx == 0:
    print(0)
    exit()
l, r = lrs[idx - 1]
if X <= r:
    print(1)
else:
    print(0)

Solution (Python):
n=int(input())
print(1 if n//100*5>=n%100 else 0)

Solution (Python):
X = int(input())
start = int(X/105) -1
end = int(X/100) + 1
flag=0
for i in range(start,end):
    residual = X - i*100
    if residual >=0 and residual <= 5*i:
        flag=1
        break
print(flag)

Solution (Python):
x = int(input())
q = x//100
r = x%100
if r <= q*5:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())

r = x % 100

p = (x - r) // 100

if r <= 5 * p:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
y = X//100
res = X-y*100
if res>y*5:
  print(0)
else:
  print(1)

Solution (Python):
N=int(input())


count=int(N/100)
mod=N%100
if(count*5<mod):
    print(0)
else:
    print(1)

Solution (Python):
x = int(input())

if x>=2000:
    ans = 1
elif x<=99:
    ans = 0
else:
    check = x//100
    check2 = x%100
    if check*5>=check2:
        ans = 1
    else:
        ans = 0
print(ans)

Solution (Python):
x = int(input())
if(int(x/100)*5 < x%100):print(0)
else:print(1)

Solution (Python):
X = int(input())
n = X//100

if X % 100 > n*5:
    print(0)
else:
    print(1)

Solution (Python):
x=int(input())
p=x//100
q=x%100
if q<=5*p:
    ans=1
else:
    ans=0
print(ans)

Solution (Python):
def examC():
    X = I()
    p,q = divmod(X,100)
    if q>p*5:
        ans = 0
    else:
        ans = 1
    print(ans)
    return

def examD():
    return
def examE():
    return

def examF():
    return

import sys,copy,bisect,itertools,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examC()

Solution (Python):
x = int(input())
if x < 100:
    print(0)
    exit()

i = 0
while 105 * i + 1 < 100 * (i + 1):
    if 105 * i + 1 <= x < 100 * (i + 1):
        print(0)
        exit()
    i += 1
print(1)

Solution (Python):
X = int(input())

if X >= 2000:
  print("1")
  quit()
else:
  D = X // 100
  if X % 100 == 0:
    print("1")
    quit()
  elif X % 100 <= D * 5:
    print("1")
  else:
    print("0")

Solution (Python):

x = input()

if len(x) <= 2:
	ans = 0
elif int(x) >= 2000:
	ans = 1
else:
	if len(x) == 3:
		a = x[0]
		b = x[1:]
	else:
		a = x[0:2]
		b = x[2:]
	a = int(''.join(a))
	b = int(''.join(b))
	if a*5 >= b:
		ans = 1
	else:
		ans = 0
print(ans)

Solution (Python):
has = int(input())
dp = [False] * (has + 1)
dp[0] = True
for i in range(100, has + 1):
    for p in range(100, 106):
        if i - p >= 0:
            dp[i] |= dp[i - p]
print(1 if dp[has] else 0)

Solution (Python):
import sys
import math
from itertools import permutations
from itertools import combinations


X = int(input())

cn = X//100
resi = X%100


if resi <= (cn*5):
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
print(int(any(100*i<=x<=100*i+5*i for i in range(1,x//100+1))))

Solution (Python):
X = int(input())

ok = [False for _ in range(100000 + 1)]
ok[0] = True

target = [100, 101, 102, 103, 104, 105]

for x in target:
    for i in range(100000 + 1 - x):
        ok[i + x] |= ok[i]

print(1 if ok[X] else 0)

Solution (Python):
x = int(input())
d, m = divmod(x, 100)
print(1 if 5 * d >= m else 0)

Solution (Python):
x = int(input())
dp = [False for _ in range(x + 1)]
dp[0] = True
for item in [100, 101, 102, 103, 104, 105]:
    for i in range(x + 1):
        if i - item >= 0:
            if dp[i - item]:
                dp[i] = True

print(1 if dp[x] else 0)
exit(0)

Solution (Python):
x=int(input())
lst=[100,101,102,103,104,105]
dp=[0]*(x+1)
dp[0]=1
for u in lst:
    h=dp[:]
    for i in range(u,x+1):
        if dp[i-u]==1 or h[i-u]==1:
            h[i]=1
    dp=h
if dp[x]==1:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
dp = [0]*(X+1)
dp[0]=1

for p in range(100,106):
    for i in range(p, X+1):
        dp[i] |= dp[i-p]
print(dp[X])

Solution (Python):
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines



























def main():
	x=int(input())
	ans=0
	
	if x>=2000:
		ans=1
	else:
		a=x//100
		b=x-a*100
		if 5*a>=b:
			ans=1
	
	print(ans)
	
	
	
	
	
	
if __name__ == "__main__":
		main()

Solution (Python):
X = int(input())
a = X//100
if a*100 <= X <= a*105:
    print(1)
else:
    print(0)

Solution (Python):
n=int(input())
res=int((n%100)/5)
n -= 105*res
if n == 0 or n >= 100:
    print(1)
else:
    print(0)

Solution (Python):
n = int(input())
cnt = 0
if n % 100 == 0:
    print(1)
    exit()

while n > 100:
    n -= 100
    cnt += 1
    if n <= cnt * 5:
        print(1)
        exit()
print(0)

Solution (Python):
x = int(input())
r = x % 100
for i in range(5, 0, -1):
    while r >= i:
        r -= i
        x -= 100
    if x < 0:
        print(0)
        exit(0)
    if r == 0:
        print(1)
        exit(0)

Solution (Python):
X = int(input())
N = X // 100
if N * 5 >= X - N * 100:
    print(1)
else:
    print(0)

Solution (Python):


COINS = [100, 101, 102, 103, 104, 105]


def find_combinations(x, coins=COINS):
    dp = [int(i % coins[0] == 0) for i in range(x + 1)]
    for coin in coins[1:]:
        for i in range(coin, x + 1):
            dp[i] += dp[i - coin]
    return dp[x] > 0


def main():
    x = int(input())
    res = find_combinations(x)
    if res:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
def main():
    x = int(sys.stdin.readline().rstrip())
    q, r = divmod(x, 100)
    if r <= 5 * q:
        ans = 1
    else:
        ans = 0
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
x=int(input())
a=x%100
b=x//100
c=a//5
c+=(a%5!=0)
print(int(b>=c))

Solution (Python):
x=int(input())
lists=[0 for i in range(100010)]
lists[100]=1
lists[101]=1
lists[102]=1
lists[103]=1
lists[104]=1
lists[105]=1
for i in range(106,100001):
    if lists[i-105]==1 or lists[i-104]==1 or lists[i-103]==1 or lists[i-102]==1 or lists[i-101]==1 or lists[i-100]==1:
        lists[i]=1
    else:
        pass
print(lists[x])

Solution (Python):
X = int(input())

if X < 100:
    print(0)
    exit()

max_num = X // 100

num_frac = X % 100

if num_frac <= max_num * 5:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
n=x//100
chk=False
for i in range(1,n+1):
  if x-(i*100)<=5*i:
    chk=True
print(1 if chk else 0)

Solution (Python):
X = int(input())
a,b = X//100, X%100
ans = 0
if b <= 5*a:
    ans = 1
print(ans)

Solution (Python):
X = int(input())
if X % 100 <= ((X // 100) * 5):
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
if x // 100 * 5 < x % 100:
    print(0)
else:
    print(1)

Solution (Python):
x = int(input())

two = x % 100

q, r = divmod(two, 5)

if r:
    q += 1

if x // 100 >= q:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
print(int(x // 100 * 5 >= x % 100))

Solution (Python):
X = int(input())
dp = [0]*(X+1+110)
dp[0] = 1
for i in range(1, X+1):
    if any(dp[i-j] == 1 for j in range(100, 106)):
        dp[i] = 1
print(dp[X])

Solution (Python):
X = int(input())
Xdiv100 = X // 100
if Xdiv100 == 0:
    print(0)
elif Xdiv100 < 20:
    if Xdiv100 * 5 < X % 100:
        print(0)
    else:
        print(1)
else:
    print(1)

Solution (Python):
X = int(input())
x, y = X//100, X%100

z = 0
for i in range(5, 0, -1):
    z += y // i
    y %= i

if z <= x:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    
    x = int(input())

    num = x//100
    a = x%100

    if a <= num*5:
        print(1)
    else:
        print(0)


    


if __name__ == '__main__':
    main()

Solution (Python):
x=int(input())
num=x//100
if x-num*100<=5*num:print(1)
else:print(0)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
inf=float("inf")
x=int(input())
maxkosuu=x//100
amari=x%100
if amari<=maxkosuu*5:
    print(1)
else:
    print(0)

Solution (Python):
def p_c():
    x = int(input())
    n = x // 100
    if x - (n * 100) <= 5 * n:
        print(1)
    else:
        print(0)
        
p_c()

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
dp = [0] * (N + 1)
dp[0] = 1
for i in range(N):
  for j in range(6):
    if i + j + 100 <= N:
      dp[i + j + 100] += dp[i]
if dp[-1]: print(1)
else: print(0)

Solution (Python):

x = int(input())
dp = [False] * (x + 1)
dp[0] = True
for delta in range(100, 105 + 1):
    for y in range(len(dp) - delta):
        if dp[y]:
            dp[y + delta] = True
print(int(dp[x]))