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):
total = int(input())
cs = (100, 101, 102, 103, 104, 105)
dp = [int(i % cs[0] == 0) for i in range(total + 1)]
for c in cs[1:]:
  for i in range(c, total + 1): 
    dp[i] += dp[i - c]
if(dp[-1] == 0): print(0)
else: print(1)

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(X):
    """Test Case
    >>> print_ans(615)
    1
    >>> print_ans(217)
    0
    """
    A, B = divmod(X, 100)
    taples = (1, 2, 3, 4, 5)
    ans = 0
    for i in taples[::-1]:
        C, B = divmod(B, i)
        ans += C
    if ans <= A:
        print("1")
    else:
        print("0")

if __name__ == '__main__':
    X = int(input().rstrip())
    print_ans(X)

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

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

for i in range(0,1001): 
    if X>=100*i and X<=100*i+5*i:
        print(1)
        exit()

print(0)

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

if a >= 2100:
    print(1)
else:
    b = a//100
    c = a%100
    if c <= b * 5:
        print(1)
    else:
        print(0)

Solution (Python):
K=int(input())
n=6
a=[100,101,102,103,104,105]
m=[1000000,1000000,1000000,1000000,1000000,1000000]

dp=[-1 for i in range(K+1)]
dp[0]=0
for i in range(n):
    for j in range(K+1):
        if dp[j]>=0:
            dp[j]=m[i]
        elif j<a[i] or dp[j-a[i]]<=0:
            dp[j]=-1
        else:
            dp[j]=dp[j-a[i]]-1
    
if dp[K]>=0:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
def ans():
  if x<100:
    print(0)
    return
  s=str(x)
  sl=len(s)
  m=int(s[sl-2]) 
  n=int(s[sl-1]) 
  sum=0
  sum+=105*((m*10)/5) 
  while n>0:
    if n>=5:
      sum+=105
      n-=5
    else:
      sum+=100+n
      n-=n
  if x-sum>=0:
    print(1)
    return
  print(0)
ans()

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

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

num = X // 100


if num > (X % 100) // 5 or X % 105 == 0:
    print(1)
else:
    print(0)

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

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

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

temp=-(-X//105)
hiku=temp*105-X

if temp*5>=hiku:
	print(1)
else:
	print(0)

Solution (Python):
X = list(input())
L = len(X)

if len(X) < 3:
    print(0)
    exit()

mon1 = 10*int(X[-2]) + int(X[-1])
mon2 = 0

for i in range(L-2):
    mon2 += int(X[i]) * 10 ** (L-i-1)

a = 0
for i in range(5,0,-1):
    b = mon1 % i
    a += (mon1 - b) / i
    mon1 = mon1 % i

if a > mon2 // 100:
    print(0)
else:
    print(1)

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

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

n = x // 100
m = x % 100

if n >= -(-m // 5):
  print(1)
else:
  print(0)

Solution (Python):

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    x = ii()
    l = [0 for i in range(200005)]

    l[100] = 1
    l[101] = 1
    l[102] = 1
    l[103] = 1
    l[104] = 1
    l[105] = 1
    
    for a in range(6):
        for i in range(150000):
            if l[i] == 1:
                l[i+100+a] = 1
    
    print(l[x])



main()

Solution (Python):
n = int(input())
x = str(n)
count = 0

if len(x)<=2:
    print(0)



else:
    num = int(x[-2]+x[-1])
    pot = (n-num)/100
    while(True):
        if num>5:
            num-=5
            count+=1
        else:
            count+=1
            break
    if count<=pot:
        print(1)
    else:
        print(0)

Solution (Python):
n = int(input())
if n >= 2000:
    print(1)
else:
    d = n % 100
    l = (d // 5) + (d % 5 != 0)
    
    if (n // 100) >= l and n != 0:
        print(1)
    else:
        print(0)

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

Solution (Python):
def yes():
    print(1)
def no():
    print(0)


X=int(input())
left,right=divmod(X,100)
left_min=0
r=right
for i in range(0,5):
    i=5-i
    count,r=divmod(r,i)
    left_min=left_min+count
if left>=left_min:
    yes()
else:
    no()

Solution (Python):
N=int(input())
a=N%100
b=N//100

if N > 2099:
  print(1)
else:
  if a <= 5*b:
    print(1)
  else:
    print(0)

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

Solution (Python):
x = int(input())
flag = False
for i in range(x//105,x//105+3):
    ans = x - i * 100
    if ans >= 0 and ans <= 5 * i:
        flag = True

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

Solution (Python):
def solve(X):
    items = [100, 101, 102, 103, 104, 105]
    dp = [0] * (X+1)

    dp[0] = 1
    for item in items:
        if X < item:
            continue
        dp[item] = 1
    for x in range(100, X+1):
        for item in items:
            if x >= item:
                if dp[x-item]:
                    
                    dp[x] = dp[x - item]
                    break
    return dp[X]

def check(X):
    print(X, solve(X))




X = int(input())
print(solve(X))

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    dp=[0]*100001
    dp[0]=1
    x=int(input())
    for i in range(100,100001):
        if sum(dp[max(i-105,0):i-99])>0:
            dp[i]=1
    print(dp[x])

main()

Solution (Python):
x=int(input())
dp=[0]*(x+1)
dp[0]=1
for j in range(6):
    val=100+j
    
    for i in range(len(dp)):
        if i>=val:
            if dp[i-val]:
                dp[i]=1

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

Solution (Python):



X = int(input())
num = 0

if X <= 99:
    print(0)
    exit()
else:
    num = X // 100 * 100
    sub = X - num
    if sub <= X // 100 * 5:
        print(1)
    else:
        print(0)

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

l = x//100
m = x % 100
r = m//5
if m % 5 != 0: r += 1

if l >= r: print(1)
else: print(0)

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

DP=[0 for i in range(X+1)]
DP[0]=1
C=[100,101,102,103,104,105]
for i in range(6):
    for j in range(X+1):
        if DP[j]==1 and j+C[i]<=X:
            DP[j+C[i]]=1
print(DP[X])

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

Solution (Python):
def main():
    x = int(input())
    hund = x//100
    ans = 0
    a = x-hund*100
    als = [0,1,2,3,4]
    if a <= hund*5:
        while hund > 0:
            if a >= 5:
                a -= 5
                hund -= 1
                if a == 0:
                    ans = 1
                    break
            elif a in als:
                ans = 1
                break 
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
arr=[100,101,102,103,104,105]
x=int(input())
dp=[0]*(x+5)
dp[0]=1 
for a in arr :
    for j in range(x+5):
        if a<=j: 
            if dp[j-a]==1:
                dp[j]=1 
print(dp[x])

Solution (Python):
x = int(input())
c = x // 100
d = x % 100
mi = (d+4)//5
if c>=mi:
    print('1')
else:
    print('0')

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

k, m = divmod(X, 100)
if k * 5 >= m:
    print(1)
else:
    print(0)

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

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

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

if (X%100)<=c*5:
    print(1)
else:
    print(0)

Solution (Python):




X = int(input())

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

hasu = int(str(X)[-2:])
total = 0


div5 = hasu / 5
hasu -= 5*div5
total += 105*div5

div4 = hasu / 4
hasu -= 4*div4
total += 104*div4

div3 = hasu / 3
hasu -= 3*div3
total += 103*div3

div2 = hasu / 2
hasu -= 2*div2
total += 102*div2

div1 = hasu / 1
hasu -= 1*div1
total += 101*div1


if total > X:
    print(0)
else:
    print(1)

Solution (Python):
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
a = [100,101,102,103,104,105]
dp = [[False]*(N+1) for i in range(6+1)]
dp[0][0] = True

for i in range(1,6+1):
  for j in range(N+1):
    if dp[i - 1][j] == True:
      k = 0
      while 0 <= (j + a[i - 1]*k) < N+1:
        dp[i][j + a[i - 1]*k] = True
        k += 1
print(int(dp[-1][-1]))

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

Solution (Python):
X = int(input())
kosu = int(X / 100)
mod = X % 100


if (mod / 5) <= kosu:
    print(1)
else:
    print(0)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)

ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    x=ii()
    n=x%100
    cnt=0
    for i in range(1,6)[::-1]:
        m=n%i
        cnt+=n//i
        if m==0: break
        n=m
    print(1 if cnt*100<=x-n else 0)
        



if __name__ == "__main__":
    main()

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

ans = 0

N = int(str(X)[-2:])

for i in range(5, 0, -1):
    while N >= i:
        N -= i
        ans += 1
        
if 100 <= X and X >= ans * 100: print(1)
else: print(0)

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

num_105 = X // 105
for i in range(num_105 + 1):
    remain_money_105 = (X - 105 * i)
    num_104 = remain_money_105 // 104
    for j in range(num_104 + 1):
        remain_money_104 = remain_money_105 - 104 * j
        num_103 = remain_money_104 // 103
        for k in range(num_103 + 1):
            remain_money_103 = remain_money_104 - 103 * k
            num_102 = remain_money_103 // 102
            for l in range(num_102 + 1):
                remain_money_102 = remain_money_103 - 102 * l
                num_101 = remain_money_102 // 101
                for m in range(num_101 + 1):
                    remain_money_101 = remain_money_102 - 101 * m
                    if remain_money_101 % 100 == 0:
                        print(1)
                        exit()
print(0)

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

kosuu = X // 100

amari = X - (kosuu*100)

kosuu5 = amari // 5

amari5 = amari - kosuu5 * 5

if amari5 != 0:
    kosuu5 += 1

if kosuu5 < kosuu + 1:
    print(1)
else:
    print(0)

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

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

num = X // 100
mod_v = X % 100

num_5 = mod_v // 5
mod_5 = mod_v % 5

if (mod_5 == 0 and num >= num_5) or (mod_5 > 0 and num >= (num_5+1)):
    print(1)
else:
    print(0)

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

for i in range(x//100+1):
  for j in range((x-i*100)//101+1):
    for k in range((x-i*100-j*101)//102+1):
      for l in range((x-i*100-j*101-k*102)//103+1):
        for m in range((x-i*100-j*101-k*102-l*103)//104+1):
          if (x-i*100-j*101-k*102-l*103-m*104)%105 == 0:
            print('1')
            exit()
print('0')

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




if 100 <= N <= 105:
    print(1)
    exit(0)
elif 200 <= N <= 210:
    print(1)
    exit(0)
elif 300 <= N <= 315:
    print(1)
    exit(0)
elif 400 <= N <= 420:
    print(1)
    exit(0)
elif 500 <= N <= 525:
    print(1)
    exit(0)
elif 600 <= N <= 630:
    print(1)
    exit(0)
elif 700 <= N <= 735:
    print(1)
    exit(0)
elif 800 <= N <= 840:
    print(1)
    exit(0)
elif 900 <= N <= 945:
    print(1)
    exit(0)
elif 1000 <= N <= 1050:
    print(1)
    exit(0)
elif 1100 <= N <= 1155:
    print(1)
    exit(0)
elif 1200 <= N <= 1260:
    print(1)
    exit(0)
elif 1300 <= N <= 1365:
    print(1)
    exit(0)
elif 1400 <= N <= 1470:
    print(1)
    exit(0)
elif 1500 <= N <= 1575:
    print(1)
    exit(0)
elif 1600 <= N <= 1680:
    print(1)
    exit(0)
elif 1700 <= N <= 1785:
    print(1)
    exit(0)
elif 1800 <= N <= 1890:
    print(1)
    exit(0)
elif 1900 <= N <= 1995:
    print(1)
    exit(0)
elif 2000 <= N:
    print(1)
    exit(0)
else:
    print(0)

Solution (Python):
N = int(input())
n = N//100
if n <= 105*(10**6):
  if n*100 <= N and n*105 >= N:
    print(1)
  else:
    print(0)
else:
  print(0)

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

oni = 0
while 1:
	if (1+oni)*100 == x:
		print(1)
		exit(0)
	elif (1+oni)*100 > x:
		break
	else:
		oni += 1
if oni == 0:
	print(0)
	exit(0)
sa = x - oni*100
cnt = 0
for i in range(5):
	j = 5 - i
	while sa >= j:
		sa -= j
		cnt += 1
	if sa == 0:
		break
if cnt <= oni and sa == 0:
	print(1)
else:
	print(0)

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

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

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

if x >= 2000:
    print(1)
    exit()

hun = x // 100

y = x % 100

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

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

n = X // 100

if X <= 105 * n:
    print(1)
else:
    print(0)

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

Solution (Python):
X = int(input())
 
q = X // 100
mod = X % 100

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

Solution (Python):
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()  

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)

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

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

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

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

shimo2 = int(str(x)[-2:])
ue = int(str(x)[:-2])

nums = [0]*6

for i in [5,4,3,2,1]:
    nums[i] = shimo2//i
    shimo2 -= nums[i]*i


if ue >= sum(nums):
    print(1)
else:
    print(0)

Solution (Python):
import math
X = int(input())
q, mod = divmod(X, 100)

if q == 0:
    print(0)
else:
    if q >= math.ceil(mod / 5):
        print(1)
    else:
        print(0)

Solution (Python):
x = int(input())
a = []
dif = x // 100
spl = x % 100
cnt = 0


while spl > 0:
    if spl >= 5:
        spl -= 5
    elif spl == 4:
        spl -= 4
    elif spl == 3:
        spl -= 3
    elif spl == 2:
        spl -= 2
    elif spl == 1:
        spl -= 1
    cnt += 1



if dif >= cnt:
    print(1)
else:
    print(0)

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

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

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

    if X < 100:
        print(0)
        exit()
    modx = X % 100
    warix = X // 100



    for i in range(warix + 1):
        if i > warix:
            break
        for j in range(warix + 1):
            if i + j > warix:
                break
            for k in range(warix + 1):
                if i + j + k > warix:
                    break
                for l in range(warix + 1):
                    if i + j + k + l > warix:
                        break
                    for m in range(warix + 1):
                        if i + j + k + l + m > warix:
                            break
                        for n in range(warix + 1):
                            if i + j + k + l + m + n > warix:
                                break
                            if i + 2 * j + 3 * k + 4 * l + m * 5 > 99:
                                break
                            if (i + 2 * j + 3 * k + 4 * l + m * 5) == modx and warix == (i + j + k + l + m + n):
                                print(1)
                                exit()

    print(0)



if __name__ == '__main__':
    main()

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

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

a = X % 100
b = X // 100

if a > b * 5:
    print(0)
else:
    print(1)

Solution (Python):
import sys

x = int(input())

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

    sys.exit(0)

print(1)

Solution (Python):
X = int(input())
N, M = divmod(X, 100)

if N * 5 >= M:
    answer = 1
else:
    answer = 0

print(answer)

Solution (Python):
import sys
sys.setrecursionlimit(10000)

memo = {}

def judge(x):
	if x < 0:
		return False
	elif x == 0:
		return True
	else:
		if x not in memo:
			memo[x] = judge(x - 100) or judge(x - 101) or judge(x - 102) or judge(x - 103) or judge(x - 104) or judge(x - 105)
		return memo[x]


if __name__ == "__main__":
	X = int(input())
	if judge(X):
		print(1)
	else:
		print(0)

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

if len(s) < 3:
    print(0)
else:
    xx = int(s[-2]+s[-1])
    num_item = xx//5
    if xx%5 != 0:
        num_item += 1
    
    hun = int(''.join(s[0:-2]))
    if hun < num_item:
        print(0)
    else:
        print(1)

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

if X >= 2000:
    print(1)
elif X <= int(X/100)*105:
    print(1)
else:
    print(0)

Solution (Python):
def solve():
    X = input()

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

    twoDig = int(X[len(X)-2:])
    rest = int(X[:len(X)-2])

    ans = '1'
    for i in range(rest+1):
        if twoDig == 0:
            break
        for n in range(5, 0, -1):
            if twoDig - n >= 0:
                twoDig -= n
                break
    else:
        ans = '0'
    
    print(ans)

if __name__ == '__main__':
    solve()

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

a=x%100
b=x-a

if a>x//100*5:
  print(0)
else:
  print(1)

Solution (Python):
import sys

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import heapq
import bisect
import copy

def warshall_floyd(d, N):
    for k in range(N):
        for i in range(N):
            for j in range(N):
                d[i * N +j] = min(d[i * N +j], d[i * N + k] + d[k * N + j])
    return d

MOD = 10**9 + 7

def main():
    n = getN()
    kosuu = n // 100
    if n % 100 <= kosuu * 5:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Solution (Python):
words = lambda t : list(map(t, input().split()))
n = int(input())
ans = False
if n >= 2000:
    ans = True
else:
    if (n // 100) * 5 >= (n % 100):
        ans = True
if ans:
    print(1)
else:
    print(0)

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

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

Solution (Python):
x = int(input())
ng = []
i = 0

while i < 2000:
    tmp = [num for num in range(int(i*1.05)+1, i+100)]
    ng.extend(tmp)
    i += 100

if x in ng:
    print('0')
else:
    print('1')

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

if x<100:
  print('0')
  exit()

aa=x // 100
a=x- 100*aa
b=a//5
c=a%5

def g(r):
  if r==0:
    return 0
  else:
    return 1
if b+g(c)<=aa:
  print('1')
else:
  print('0')

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	X = inputInt()

	tmp = X % 100
	kai = X // 100

	tmptmp = -(-tmp // 5)

	if tmptmp <= kai:
		print(1)
	else:
		print(0)

	
	



if __name__ == "__main__":
	main()

Solution (Python):
x = int(input())
a = x // 100
b = x % 100

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

Solution (Python):
x = int(input())
q = x // 105
r = x % 105

if r == 0 or r >= 100 - 5 * q:
    print(1)
else:
    print(0)

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

20

y = x % 100


if y <= int(5 * int(x / 100)):
    print("1")
else:
    print("0")

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

Solution (Python):


def main():
    N = int(input())
    C = N // 100
    H = N % 100

    for i in [5,4,3,2,1]:
        Ci = H // i
        if Ci > C:
            print(0)
            return
        C -= Ci
        H -= Ci * i
        N -= (100 + i) * Ci
        if N < 0:
            print(0)
            return

    print(1)



if __name__ == "__main__":
    main()

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

max_a = (x // 100) + 1
max_b = (x // 101) + 1
max_c = (x // 102) + 1
max_d = (x // 103) + 1
max_e = (x // 104) + 1

for a in range(max_a):
  for b in range(max_b):
    for c in range(max_c):
      for d in range(max_d):
        for e in range(max_e):
          for_f = x - (a * 100 + b * 101 + c * 102 + d * 103 + e * 104)
          if for_f >= 0 and for_f % 105 == 0:
            
            print('1')
            exit(0)
print('0')

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

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

n = x // 100
rest = x % 100

if n >= (rest + 4) // 5:
  print(1)
else:
  print(0)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	X = inputInt()

	tmp = X % 100
	kai = X // 100

	tmptmp = -(-tmp // 5)

	if tmptmp <= kai:
		print(1)
	else:
		print(0)

	
	



if __name__ == "__main__":
	main()

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

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

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

x1 = X // 100
x2 = X % 100

if x2 > 5*x1:
  print(0)
else:
  print(1)

Solution (Python):


N = int(input())
S = str(N)

if len(S)>=3:
    shimo2 = int(S[-2:])
    hoka = int(S[:-2])

    count = 0
    while shimo2>0:
        if shimo2 >= 5:
            shimo2 -= 5
            count += 1
        elif shimo2 >= 4:
            shimo2 -= 4
            count += 1
        elif shimo2 >= 3:
            shimo2 -= 3
            count += 1
        elif shimo2 >= 2:
            shimo2 -= 2
            count += 1
        elif shimo2 >= 1:
            shimo2 -= 1
            count += 1
            
    if hoka >= count:
        ans = 1
    else:
        ans = 0
else:
    ans = 0

print(ans)

Solution (Python):
def main():
    X = int(input())
    for a in range(X // 100 + 1):
        for b in range((X - a * 100) // 101 + 1):
            for c in range((X - a * 100 - b * 101) // 102 + 1):
                for d in range((X - a * 100 - b * 101 - c * 102) // 103 + 1):
                    for e in range((X - a * 100 - b * 101 - c * 102 - d * 103) // 104 + 1):
                        for f in range((X - a * 100 - b * 101 - c * 102 - d * 103 - e * 104) // 105 + 1):
                            if X - a * 100 - b * 101 - c * 102 - d * 103 - e * 104 - f * 105 == 0:
                                print(1)
                                exit()

    print(0)




if __name__ == "__main__":
    main()

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

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

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

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

d = x // 100
r = x % 100

if (r / 5) <= d:
    print(1)
else:
    print(0)

Solution (Python):

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd



def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False



def main():
    X = int(input())
    n = X // 100
    remain = X - n * 100
    if remain <= 5 * n:
        print(1)
    else:
        print(0)
    



if __name__ == '__main__':
    main()

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

dp = [False] * (x + 1)
dp[0] = True

for j in range(100, x + 1):
    for t in range(100, 105 + 1):
        if j - t >= 0:
            dp[j] = dp[j] or dp[j - t]

print(1 if dp[x] else 0)

Solution (Python):

X = int(input())
for i in range(1001):
    if i * 100 <= X <= i * 100 + i * 5:
        print(1)
        exit(0)
print(0)

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

Solution (Python):
n=int(input())
for i in range(1,1001):
    if n>=i*100 and i*105>=n:
        print(1)
        break
else:
    print(0)

Solution (Python):
from sys import stdin

X = int(stdin.readline().rstrip())

if X < 100:
    print(0)
    exit()
num = X // 100
s = X % 100
if s > 5 * num and X < 2000:
    print(0)
else:
    print(1)

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

if x < 100:
    print(0)
    quit()

min_x = (x // 100) * 100
max_x = min_x + (x // 100) * 5

if min_x <= x and max_x >= x:
    print(1)
else:
    print(0)

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

Solution (Python):
import sys
input = sys.stdin.readline
x = int(input())
for oni in range(1001):
    cnt = oni * 100
    if cnt > x:
        break
    for sand in range(1001):
        cnt2 = cnt
        cnt2 += sand * 101
        if cnt2 > x:
            break
        for cookie in range(1001):
            cnt3 = cnt2
            cnt3 += cookie * 102
            if cnt3 > x:
                break
            for cake in range(1001):
                cnt4 = cnt3
                cnt4 += cake * 103
                if cnt4 > x:
                    break
                for candy in range(1001):
                    cnt5 = cnt4
                    cnt5 += candy *104
                    if cnt5 > x:
                        break
                    for pc in range(1001):
                        cnt6 = cnt5
                        cnt6 += pc * 105
                        if cnt6 == x:
                            print(1)
                            exit()
                        elif cnt6 > x:
                            break
print(0)

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

t=X//100

if 100*t<=X<=105*t:
    print(1)
else:
    print(0)

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

ans = 1
ng_list = [(-1,100)] + [ (105*i, 100*(i+1)) for i in range(1,20) ]
for a, b in ng_list:
    if a < n < b:
        ans = 0
        break
print(ans)

Solution (Python):
X = int(input())
if X >= 100:
    first = int(str(X)[:-2])

    last = int(str(X)[-2:])
    p = [0 for i in range(6)]
    for i in range(5,0,-1):
        p[i] = last // i
        last = last - p[i] * i
    sump = sum(p)
    if first >= sump:
        print(1)
    else:
        print(0)
else:
    print(0)

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

A = X // 100
B = X % 100

if A == 0:
    print(0)
elif 1 <= A <= 20:
    if B <= 5 * A:
        print(1)
    else:
        print(0)
else:
    print(1)

Solution (Python):

import sys


def solve(X: int):
    for n in range(X//100-50,X//100+1):
        if n*105 >= X >= n*100:
            print(1)
            return
    print(0)
    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):
X=int(input())
n=X//100
x=X%100
if x//5<=n and x%5==0:
  print(1)
elif x//5<n:
  print(1)
else:
  print(0)

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

Solution (Python):
X = int(input())
check = [False for i in range(105001)]
for i in range(1000):
    for j in range(i*100, i*105+1):
    	check[j] = True
print(int(check[X]))

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

if X-100*C<=5*C:
  print(1)
else:
  print(0)

Solution (Python):
inpl = lambda: list(map(int,input().split()))
X = int(input())
if X < 100:
    print(0)
    exit()
elif X <= 105:
    print(1)
    exit()
dp = [False]*(X+1)
goods = list(range(100,106))
dp[0] = True
for k in goods:
    dp[k] = True

for i in range(200, X+1):
    for k in goods:
        if dp[i-k]:
            dp[i] = True
            break
if dp[X]:
    print(1)
else:
    print(0)