Harryxun/stf_run huggingface dataset:
my_list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
N = input()
N = int(N)
print(my_list[N])

### FIXED CODE ###

my_list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
N = input()
N = int(N)
print(my_list[N-1])
if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")

### FIXED CODE ###

b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")
a, b = int(input());
r = a * b;
if (r % 2):
  print(Even);
else:
  print(Odd);

### FIXED CODE ###

a, b = map(int,input().split())
r = a * b
if (r % 2 == 0):
  print("Even");
else:
  print("Odd");
N, K = list(map(int,input().split()))
A = list(map(int,input().split()))
P = [0] + [abs(i) for i in A if i> 0 ]
M = [abs(i) for i in A if i< 0 ] +[0]
M = sorted(M,reverse =False)

cnt = 10000000
#正の部分、負の部分の長さが0の場合エラーが起こる
#正の方向でi個ろうそくを通って、負の方向にK-i個ろうそくを通る
for i in range(1,K):
    cnt =min(cnt,P[i]*2 + M[K-i])
    #print(cnt)
#負の方向でi個ろうそくを通って、正の方向にK-i個ろうそくを通る
for i in range(1,K):
    cnt =min(cnt,M[i]*2 + P[K-i])
    #print(cnt)

print(cnt)

### FIXED CODE ###

N, K = list(map(int,input().split()))
A = list(map(int,input().split()))
P = [0] + [abs(i) for i in A if i> 0 ]
M = [abs(i) for i in A if i< 0 ] +[0]
M = sorted(M,reverse =False)


cnt = 10000000000

if len(P) == len(M) == 1:
    cnt = 0
elif len(P) == 1:
    cnt = M[K]
elif len(M) == 1:
    cnt = P[K]
else:
    #リストがK以下の場合不具合が起きる
    #for i in range(1,K):   
    #len(P)=4 len(M)=3 K=5の場合、IndexErrorとなる。rangeをうまく設定する必要があるが実装できない。
    #正の方向でi個ろうそくを通って、負の方向にK-i個ろうそくを通る
    s = max(0,K-len(M)+1)
    e = min(K+1, len(P))
    for i in range(s, e):
        cnt =min(cnt,P[i]*2 + M[K-i])
    #負の方向でi個ろうそくを通って、正の方向にK-i個ろうそくを通る
    s1 = max(0,K-len(P)+1)
    e1 = min(K+1, len(M))
    for i in range(s1, e1):
        cnt =min(cnt,M[i]*2 + P[K-i])

print(cnt)
n = int(input())
ln = input().split()
s = 0

for i in range(n):
  for j in range(i + 1, n):
    s += int(ln[i]) * int(ln[j])
    
print(s)

### FIXED CODE ###

a, b = input().split()
a = int(a)
b = int(b)

if a >= 2 * b:
  print(a - 2 * b)
  
else:
  print(0)
while True:
    try:
        s=raw_input().strip().split()
    except EOFError:
        break
    L=[]
    for d in s:
        if d.isdigit():
            L.append(float(d))
        else:
            op1=L.pop()
            op2=L.pop()
            if d=="-":
                L.append(op2-op1)
            elif d=="+":
                L.append(op2+op1)
            elif d=="*":
                L.append(op2*op1)
            elif d=="/":
                L.append(op2/op1)
    print L[0]

### FIXED CODE ###

import sys
for s in sys.stdin.readlines():
    L=[]
    for d in s.strip().split():
        if d=="-":
            d=(-(L.pop()-L.pop()))
        elif d=="+":
            d=(L.pop()+L.pop())
        elif d=="*":
            d=(L.pop()*L.pop())
        elif d=="/":
            d=(1/L.pop()*L.pop())
        L.append(float(d))
    print "%.6f"%L[0]
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

li = prime_factorize(total)
lin = []
for key, value in groupby(li):
    lin.append(len(list(value)))

point = 1

for i in lin:
    point *= i+1
    point %= 10**9+7

print(point)

### FIXED CODE ###

from sys import stdin
import math
from itertools import groupby

n = int(stdin.readline().rstrip())
total = math.factorial(n)

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

li = prime_factorize(total)
lin = []
for key, value in groupby(li):
    lin.append(len(list(value)))

point = 1

for i in lin:
    point *= i+1
    point %= 10**9+7

print(point)
N = int(input())
reds = sorted([list(map(int,input().split()))])
blues = sorted([list(map(int,input().split()))])

reds.sort(reverse = True)
res = 0

for c,d in blues:
  for a,b in reds:
    if a,c and b<d:
      reds.remove([a,b])
      res+=1
      break
      
print(res)

### FIXED CODE ###

n = int(input())
reds = sorted([list(map(int,input().split())) for i in range(n)],key=lambda reds: -reds[1])
blues = sorted([list(map(int,input().split())) for i in range(n)])

res = 0

for c,d in blues:
  for a,b in reds:
    if a<c and b<d:
      reds.remove([a,b])
      res+=1
      break
      
print(res)
n, m = map(int, input().split())
A = []*m
B = []*m
for i in range(m):
  A[i],B[i] =map(int, input().split())

al = n*(n-1)//2
ansl = [al]
d = list(range(m+1))
dl = [[_] for _ in range(m+1)]

for i in range(m-1,0,-1):
  x = d[A[i]]
  y = d[B[i]]
  x,y = max(x,y),min(x,y)
  if x > y:
    al -= len(dl[x])*len(dl[y])
    for i in dl[y]:
      d[i] = x
    dl[x] += dl[y]
  ansl.append(al)

for i in range(m-1,-1,-1):
  print(int(ansl[i]))

### FIXED CODE ###

n, m = map(int, input().split())
A = [0]*m
B = [0]*m
for i in range(m):
  A[i],B[i] =map(int, input().split())

al = n*(n-1)//2
ansl = [al]
d = list(range(n+1))
dl = [[_] for _ in range(n+1)]

for i in range(m-1,0,-1):
  x = d[A[i]]
  y = d[B[i]]
  x,y = max(x,y),min(x,y)
  if x > y:
    al -= len(dl[x])*len(dl[y])
    for i in dl[y]:
      d[i] = x
    dl[x] += dl[y]
  ansl.append(al)

for i in range(m-1,-1,-1):
  print(int(ansl[i]))
a,b=map(int,input().split())
  print(max(a+b,a-b,a*b))


### FIXED CODE ###

a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
S = input()
wk = S[:4]+S[5:7]+S[8:10]
if wk<20190430:
    print("Heisei")
else:
    print("TBD")

### FIXED CODE ###

S = input()
wk = int(S[:4]+S[5:7]+S[8:10])
if wk<=20190430:
    print("Heisei")
else:
    print("TBD")
a, b=map(int,raw_input().split())

if a>b:
  print 'a > b'
else if a<b:
  print 'a < b'
else:
  print 'a == b'

### FIXED CODE ###

a,b=map(int,raw_input().split())

if a>b:
  print 'a > b'
elif a<b:
  print 'a < b'
else:
  print 'a == b'
n = int(input())
pos=[]
for i in range(n):
  x,y,h = map(int, input().split())
  pos.append([x,y,h])

def solve():
  for cx in range(101):
    for cy in range(101):
      res=[]
      edge=[]
      for i in range(n):
        x=pos[i][0]
        y=pos[i][1]
        h=pos[i][2]
        H = h+abs(x-cx)+abs(y-cy)
        if h == 0:
          if (x == cx+H or x == cx-H) or (y == cy+H or x == cy-H):
            res.append(H)
        else:
          res.append(H)
      if len(set(res)) ==1:
        return [cx,cy,res[0]]
cx,cy,h=solve()
print(cx,cy,h)

### FIXED CODE ###

n = int(input())
pos=[]
for i in range(n):
  x,y,h = map(int, input().split())
  pos.append([x,y,h])

pos = sorted(pos, key=lambda x: x[2])
tx,ty,th = pos[-1]
def solve():
  for cx in range(101):
    for cy in range(101):
      H = th+abs(tx-cx)+abs(ty-cy)
      for x,y,h in pos:
        if h != max(H-abs(x-cx)-abs(y-cy), 0):
          break
      else:
        return(cx,cy,H)

cx,cy,H=solve()
print(cx,cy,H)
import numpy as np
N = int(input())
print((np.arange(N-1) + 1).sum())

### FIXED CODE ###

import numpy as np
N = int(input())
print(N*(N-1)//2)
N, M = map(int, input().split())
a = []
for _ in range(M):
    a.append(int(input()))

arr=[0]*N

if 1 in a:
    arr[0]=0
else:
    arr[0]=1

if 2 in a:
    arr[1]=0
else:
    arr[1]=1+arr[0]
    
for i in range(2,N):
    if i+1 in a:
        arr[i]=0
    else:
        arr[i]=arr[i-1]+arr[i-2]

print(arr[-1]%(10**9+7))

### FIXED CODE ###

MOD=10**9+7
N,M=map(int,input().split())
dp=[0]*(N+1)
dp[0]=1
A=set(int(input()) for _ in range(M))
for i in range(1,N+1):
    if i in A:
        continue
    x=dp[i-1]
    if i>1:
        x+=dp[i-2]
    dp[i]=x%MOD
print(dp[N])
n = int(input())
A = []
for i in range(n):
  s = input()
  A.append(sorted(s))
x = 0
for i in range(n):
  for j in range(i+1, n):
  	if A[i] == A[j]:
      x+=1
print(x)

### FIXED CODE ###

n = int(input())
from collections import defaultdict as dd

hsh = dd(int)

for i in range(n):
  s = list(input())
  s = ''.join(sorted(s))
  hsh[s] += 1

x = 0
for i in hsh.keys():
  x += (hsh[i]*(hsh[i]-1))//2

print(x)
while True:
    a, op, b = map(int, inptut().split(" "))
    if a == 0 and b == 0:
        break
    
    if op == "+":
        c = a + b
    elif op == "-":
        c = a - b
    elif op == "*":
        c = a + b
    else
        c = a / b
    print(c)


### FIXED CODE ###

while True:
    a, op, b = map(str, input().split(" "))
    if op == "?":
        break
    a, b = int(a), int(b)
    if op == "+":
        c = a + b
    elif op == "-":
        c = a - b
    elif op == "*":
        c = a * b
    else:
        c = a // b
    print(c)
N = int(input())
A = list(map(int, input().split()))


# number_to_prime[i]: i の最小の素因数, iが素数ならば0
number_to_prime = [0] * (10**6 + 1)

# preprocess
for i in range(2, 10**6+1):
    if not number_to_prime[i]:
        j = 2
        while j*i <= 10**6:
            number_to_prime[j*i] = i
            j += 1


def is_pairwise():
    used_primes = set()
    pairwise_flag = 1
    for a in A:
        if a == 1:
            continue
        curr_primes = set()
        while number_to_prime[a]:
            prime = number_to_prime[a]
            curr_primes.add(prime)
            a //= prime
        if used_primes & (curr_primes | set([a])):
            pairwise_flag = 0
            break
        else:
            used_primes = used_primes | (curr_primes | set([a]))
    return pairwise_flag

def is_setwise(*A):
    import math
    from functools import reduce

    return reduce(math.gcd, A) == 1

if is_pairwise():
    print("pairwise coprime")
elif is_setwise(*A):
    0/0
    print("setwise coprime")
else:
    print("not coprime")

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))


# number_to_prime[i]: i の最小の素因数, iが素数ならば0
number_to_prime = [0] * (10**6 + 1)

# preprocess
for i in range(2, 10**6+1):
    if not number_to_prime[i]:
        j = 1
        while j*i <= 10**6:
            number_to_prime[j*i] = i
            j += 1

def is_pair_copr(A):
    import numpy as np
    U = 1 << 20
    div_p = np.arange(U)
    for p in range(2, U):
        if div_p[p] != p:
            continue
        div_p[p::p] = p
    used = np.zeros(U, np.bool_)
 
    for x in A:
        while x > 1:
            p = div_p[x]
            while x % p == 0:
                x //= p
            if used[p]:
                return False
            used[p] = True
    return True

def is_pairwise():
    used_primes = set()
    pairwise_flag = 1
    for a in A:
        curr_primes = set()
        while a > 1:
            prime = number_to_prime[a]
            curr_primes.add(prime)
            a //= prime
        if used_primes & curr_primes:
            pairwise_flag = 0
            break
        else:
            used_primes = used_primes | curr_primes
    return pairwise_flag

def is_setwise(*A):
    import math
    from functools import reduce

    return reduce(math.gcd, A) == 1

if is_pair_copr(A):
    print("pairwise coprime")
elif is_setwise(*A):
    print("setwise coprime")
else:
    print("not coprime")
print(int((int(input())+int(input())+1)/2))

### FIXED CODE ###

a, b = map(int, input().split())
print((a + b + 1) // 2)
from bisect import bisect
from collections import deque

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

for i in range(1, len(A)+1):
    A[i] += A[i-1]
for i in range(1, len(B)+1):
    B[i] += B[i-1]

indexB = len(B) - 1
results = [0]
for i in range(len(A)):
    time = A[i]
    if time > K:
        break
    enable_for_b = K - time
    results.append(i + bisect(B, enable_for_b))

print(max(results))

### FIXED CODE ###

from bisect import bisect
from collections import deque

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

for i in range(1, len(A)):
    A[i] += A[i-1]
for i in range(1, len(B)):
    B[i] += B[i-1]
A.insert(0, 0)
indexB = len(B) - 1
results = [0]
for i in range(len(A)):
    time = A[i]
    if time > K:
        break
    enable_for_b = K - time
    results.append(i + bisect(B, enable_for_b))

print(max(results))
import numpy as np
import math

def solve():
    n, k = map(int, input().split())
    h = list(map(int, input().split()))
    dp = [0]*(n+5)
    for i in range(1,n):
        dp[i] = min([
            [dp[j]+abs(h[i]-h[j]) for i in range(max(0,i-k),i)]
            ])
    print(dp[n-1])
    return 0
 
if __name__ == "__main__":
    solve()


### FIXED CODE ###

def hoge():
  dp = [0] * (n + 5)
  for i in range(1, n):
    p = [dp[j] + abs(h_list[i] - h_list[j]) for j in range(max(0, i - k), i)]
    dp[i] = min(p)
  return dp[n - 1]

def solve():
  global n, k, h_list
  n, k = map(int, input().split())
  h_list = list(map(int, input().split()))
  ans = hoge()
  print(ans)
  return 0

if __name__ == "__main__":
  solve()
for i in xrange(input()):
	grad1, grad2 = 0, 0
	x1,y1,x2,y2,x3,y3,x4,y4=map(float,raw_input().split())
	grad1, grad2 =	(y1 - y2)*(x3 - x4) , (y3 - y4)*(x1 - x2)
	if grad1 - grad2 == 0:
		print "YES"
	else:
		print "NO"

### FIXED CODE ###

n = int(raw_input())
for l in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
    if abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3))< 1e-10:
        print "YES"
    else:
        print "NO"
l = map(int, input().split())
print(l ** 3 / 27)

### FIXED CODE ###

L = int(input())
L /= 3
print(L**3)
import math

N,K = map(int,input().split())

def prob_wins(x,k):
    if x>=k:
        return 1
    return 0.5**math.ceil(math.log2(k/x))

ans = 0
for i in range(1,N+1):
    ans += prob_wins(i,K)
    # print(i,prob_wins(i,K))
print(ans/N)

### FIXED CODE ###

import math
from math import log2
from math import ceil

N,K = map(int,input().split())

def prob_wins(x,k):
    if x>=k:
        return 1
    return 0.5**ceil(log2(k/x))

ans = 0
for i in range(1,N+1):
    ans += prob_wins(i,K)
    # print(i,prob_wins(i,K))
print(ans/N)
population = int(input())
a2b = int(input())
b2c = int(input())
c2d = int(input())
d2e = int(input())
e2f = int(input())

vehicle = [a2b,b2c,c2d,d2e,e2f]

print(int(population/vehicle_min) + 5)

### FIXED CODE ###

import math
population = int(input())
a2b = int(input())
b2c = int(input())
c2d = int(input())
d2e = int(input())
e2f = int(input())
city = [population,0,0,0,0,0]
vehicle = [a2b,b2c,c2d,d2e,e2f]
print(math.ceil(population/min(vehicle)) + 4)
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[] for _ in range(num)]
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

# FFT
# use python3
# a = [a1,a2,a3], b= [b1,b2,b3]
# return [a1b1,a1b2+a2b1,a1a3+a2b2+a3b1,a2b3+a3b2,a3b3]
import numpy as np
def Convolution(a,b):
    bit = (len(a)+len(b)-2).bit_length()
    L = 2**bit
    fa,fb = np.fft.rfft(a,L), np.fft.rfft(b,L)
    c = np.rint(np.fft.irfft(fa*fb,L)).astype(np.int64)
    return c[:len(a)+len(b)-1]

N,M = II()
A = III()

h = [0]*(max(A))
for a in A:
    h[a-1] += 1

conv = [0,0] + Convolution(h,h)
ans = 0
for k in range(2,2*max(A)+1)[::-1]:
    if conv[k]<M:
        ans += k*conv[k]
        M -= conv[k]
    else:
        ans += k*M
        break
        
print(ans)

### FIXED CODE ###

import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

from bisect import bisect_left

#Binary Indexed Tree（区間加算）
#1-indexed
class Range_BIT():
    def __init__(self, N):
        self.size = N
        self.data0 = [0]*(N+1)
        self.data1 = [0]*(N+1)

    def _add(self, data, k, x):
        while k <= self.size:
            data[k] += x
            k += k & -k

    # 区間[l,r)にxを加算
    def add(self, l, r, x):
        self._add(self.data0, l, -x*(l-1))
        self._add(self.data0, r, x*(r-1))
        self._add(self.data1, l, x)
        self._add(self.data1, r, -x)

    def _get(self, data, k):
        s = 0
        while k:
            s += data[k]
            k -= k & -k
        return s

    # 区間[l,r)の和を求める
    def query(self, l, r):
        return self._get(self.data1, r-1)*(r-1)+self._get(self.data0, r-1)\
                -self._get(self.data1, l-1)*(l-1)-self._get(self.data0, l-1)

N,M = II()
A = III()
A.sort()

def is_ok(x):
    num = 0
    for a in A:
        p = bisect_left(A,x-a)
        num += N-p
    if num>=M:
        return True
    else:
        return False

#l：その値以上の幸福度の握手がM通り以上ある最大値
l = 0
r = 2*10**5 + 1
while abs(r-l)>1:
    mid = (l+r)//2
    if is_ok(mid):
        l = mid
    else:
        r = mid

#値l以上の握手で用いるA[i]の個数を調べる
bit = Range_BIT(N)
for i in range(1,N+1):
    p = bisect_left(A,l-A[i-1])
    if p!=N:
        bit.add(p+1,N+1,1)
        bit.add(i,i+1,N-p)
x = [0]*N
for i in range(N):
    x[i] = bit.query(i+1,i+2)

ans = 0
for i in range(N):
    ans += A[i]*x[i]

#握手の回数がM回になるように調整
ans -= l*((sum(x)-2*M)//2)

print(ans)
#!/usr/local/env python
# -*- conding:utf-8 -*-

import sys

a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])

if (b - a) - (c - b) == 0:
    print 'YES'
else:
    print 'NO'

### FIXED CODE ###

#!/usr/bin/env python
# -*- conding: utf-8 -*-

raw = raw_input()
a = int(raw.split()[0])
b = int(raw.split()[1])
c = int(raw.split()[2])

if (b - a) - (c - b) == 0:
    print 'YES'
else:
    print 'NO'
import numpy as np
N = int(input())
A = list(map(int, input().split()))
print(np.sum(np.tril(np.outer(np.array(A), np.array(A)), k = -1)) % (10 ** 9 + 7))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
T = sum(A)
ans = 0
for i in range(N):
  T -= A[i]
  ans += A[i] * T
  ans %= 10 ** 9 + 7
print(ans)
a = int(input())
b = int(input())
c = int(input())
d = int(input())
if a*b > c*d:
    print(a*b)
else:
    print(c*d)

### FIXED CODE ###

a,b,c,d = map(int,input().split())
print(max(a*b, c*d))
import bisect

X = int(input())
five = [i ** 5 for i in range(0,1000)]

left = bisect.bisect_left(five, X) - 1
right = bisect.bisect(five, X)

if abs(five[left]  - X) < abs(five[right]  - X):
  dif = X - five[left]
  b = five.index(dif) * -1
  a = left
else:
  dif = five[right] - X
  b = five.index(dif)
  a = right
  
print(a,b)

### FIXED CODE ###

X = int(input())

ans = []

for i in range(-118,120):
  for j in range(-119,119):
    if i ** 5 - j ** 5 == X:
      ans = [i,j]
      break

print(*ans)
import numpy as np

k,n = map(int,input().split())
a_ls = list(map(int,input().split()))

next_ls = [0] * n
for i in range(n-1):
    next_ls[i] = a_ls[i+1] - a_ls[i]
next_ls[n-1] = k - a_ls[-1] + a_ls[0]
argmax = np.argmax(next_ls)
next_ls.pop(argmax)
print(sum(next_ls))


### FIXED CODE ###

import numpy as np

k,n = map(int,input().split())
a_ls = list(map(int,input().split()))

next_ls = [0] * n
for i in range(n-1):
    next_ls[i] = a_ls[i+1] - a_ls[i]
next_ls[n-1] = k - a_ls[-1] + a_ls[0]
argmax = np.argmax(next_ls)
next_ls.pop(argmax)
print(sum(next_ls))
import math
a=input().split()
print(a[0] * a[1] / math.gcd(a[0], a[1]))

### FIXED CODE ###

import fractions
a=input().split()
print(int(a[0]) * int(a[1]) // fractions.gcd(int(a[0]), int(a[1])))
# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))

for i in range(0, N):
    v = A[i]
    j = i
    while (j >= 0) and (A[j] > j):
        A[j + 1] = A[j]
        j -= 1
    A[j + 1] = v

    for k in range(N):
        print('{0} '.format(A[k]), end='')
    print()


### FIXED CODE ###

# -*- coding: utf-8 -*-


def show(A):
    for k in range(N):
        if k == N - 1:
            print('{0}'.format(A[k]))
        else:
            print('{0}'.format(A[k]), end=' ')


N = int(input())
A = list(map(int, input().split()))
show(A)

for i in range(1, N):
    v = A[i]
    j = i - 1
    while (j >= 0) and (A[j] > v):
        A[j + 1], A[j] = A[j], v
        j -= 1

    show(A)
x,t=[int(i) for i in input().split()]
print(max(0,x-t)

### FIXED CODE ###

x,t=[int(i) for i in input().split()]
print(max(0,x-t))
def main():
    N, M = list(map(int, input().split()))
    ks = [[int(arg) for arg in input().split()] for _ in range(M)]
    p = list(map(int, input().split()))
    comb = 0

    for i in range(2**N):
        flag = False
        for j in range(N):
            denki = []
            if ((i >> j) & 1):  # 順に右にシフトさせ最下位bitのチェックを行う
                denki.append(j+1)  # フラグが立っていたら num に数字を詰める
            for k in range(M):
                KS = ks[k]
                k = KS[0]
                kosuu = 0
                for l in range(1, k+1):
                    if KS[l] in denki:
                        kosuu += 1
                if kosuu % 2 != p[k]:
                    flag = False
                    break
                else:
                    flag = True
            if flag:
                comb += 1

    print(comb)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N, M = list(map(int, input().split()))
    ks = [[int(arg) for arg in input().split()] for _ in range(M)]
    p = list(map(int, input().split()))
    comb = 0

    for i in range(2**N):
        flag = False
        denki = []
        for j in range(N):

            if ((i >> j) & 1):  # 順に右にシフトさせ最下位bitのチェックを行う
                denki.append(j+1)  # フラグが立っていたら num に数字を詰める
        for k in range(M):
            KS = ks[k]
            idk = KS[0]
            kosuu = 0
            for l in range(1, idk+1):
                if KS[l] in denki:
                    kosuu += 1
            if kosuu % 2 != p[k]:
                flag = False
                break
            else:
                flag = True
        if flag:
            comb += 1

    print(comb)


if __name__ == '__main__':
    main()
# https://atcoder.jp/contests/abc155/submissions/10175015

def main():
    n = input()[::-1]
    s = 0
    cnt = 0
    for i, ni in enumerate(n):
        k = int(ni) + s
        if k < 5 or k == 5 and int(n[i + 1]) < 5:
            cnt += k
            s = 0
        else:
            cnt += 10 - k
            s = 1
    cnt += s
    print(cnt)
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

n = list(map(int, input()[::-1])) + [0]
s = 0
res = 0
for i, ni in enumerate(n[:-1]):
    k = ni + s
    if k < 5 or (k == 5 and int(n[i + 1]) < 5):
        res += k
        s = 0
    else:
        res += 10 - k
        s = 1
res += s
print(res)
from collections import deque

n=int(input())
E=[[]for _ in range(n)]
L=[]
for i in range(n-1):
   a,b=map(int,input().split())
   E[a-1].append(b-1)
   L.append(b-1)

que=deque([0])
ans=[0]*n
while que:
   s=que.pop()
   color=1
   for ni in E[s]:
      if color==ans[s]:
         color+=1
      else:
         ans[ni]=color
         color+=1
         que.append(ni)
print(max(ans))
for i in L:
   print(ans(i))

### FIXED CODE ###

from collections import deque
 
N = int(input())
edges = [[] for _ in range(N + 1)]
ends = []
 
for _ in range(N-1):
    a, b = map(int, input().split())
    edges[a].append(b)
    ends.append(b)
 
nodes = deque([1])
count = [0] * (N + 1)
 
while nodes:
    node = nodes.popleft()
    nodes.extend(edges[node])
 
    c = 0
    for n in edges[node]:
        c += 1 + (c + 1 == count[node])
        count[n] = c
 
print(max(count))
for i in ends:
    print(count[i])
import sympy
n = int(input())
ans = 0
for i in range(1,n+1):
    ans += i * sympy.divisors(i)
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n+1):
    ans += ((i + i * (n//i))*(n//i))//2
print(ans)