Harryxun/stf_run huggingface dataset:
N, K = map(int, input().split())
snuke = [0] * N
for n in range(N-1):
    snack = int(input())
    A = str(input())
    snuke[snack-1] = 1
c = 0
for n in range(N):
    if snuke[n] == 0:
        c += 1
print(c)

### FIXED CODE ###

N, K = map(int, input().split())
snuke = [0] * N
for n in range(K):
    snack = int(input())
    d_snuke = map(int, input().split())
    for d in d_snuke:
        snuke[d-1] = snack
c = 0
for n in range(N):
    if snuke[n] == 0:
        c += 1
print(c)
print(x*x*x)

### FIXED CODE ###

x = int(input())
print( x ** 3)
# -*- coding: utf-8 -*-
h, w = map(int, input().split())
a = []
a = [[True] * (w + 2)]
for i in range(h):
    a.append([True] + [x == '#' for x in input()] + [True])
a.append([True] * (w + 2))
q = []


for i in range(1, w + 1):
    for j in range(1, h + 1):
        if a[i][j]:
            q.append((i, j))

count = 0
while q:
    qq = []
    for i, j in q:
        if not a[i-1][j]:
            a[i-1][j] = True
            qq.append((i - 1, j))
        if not a[i+1][j]:
            a[i+1][j] = True
            qq.append((i + 1, j))
        if not a[i][j-1]:
            a[i][j-1] = True
            qq.append((i, j - 1))
        if not a[i][j+1]:
            a[i][j+1] = True
            qq.append((i, j + 1))
    q = qq
    if len(q) <= 0:
        break
    count += 1

print(count)


### FIXED CODE ###

# -*- coding: utf-8 -*-
h, w = map(int, input().split())
a = []
a = [[True] * (w + 2)]
for i in range(h):
    a.append([True] + [x == '#' for x in input()] + [True])
a.append([True] * (w + 2))
q = []

for i in range(1, h + 1):
    for j in range(1, w + 1):
        if a[i][j]:
            q.append((i, j))

count = 0
while True:
    qq = []
    for i, j in q:
        if not a[i-1][j]:
            a[i-1][j] = True
            qq.append((i - 1, j))
        if not a[i+1][j]:
            a[i+1][j] = True
            qq.append((i + 1, j))
        if not a[i][j-1]:
            a[i][j-1] = True
            qq.append((i, j - 1))
        if not a[i][j+1]:
            a[i][j+1] = True
            qq.append((i, j + 1))
    q = qq
    if len(q) <= 0:
        break
    count += 1

print(count)
while True:
  if raw_input() == '0 0':
    break
  x, y = sorted(map(int, raw_input().split()))
  print str(x) + ' ' + str(y)

### FIXED CODE ###

while True:
  x, y = sorted(map(int, raw_input().split()))
  if x ==0 and y == 0:
    break
  print '{0} {1}'.format(x, y)
A, B, C = map(int, input().split())

if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')


### FIXED CODE ###

A, B, C = input().split()

if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')
import numpy as np

def comb2(n):
    return int(n*(n-1)/2)

n = int(input())

a = np.array([int(i) for i in input().split()])

b = a+a.reshape(n,1)

e = np.ones(n, dtype=int) - np.identity(n, dtype=int)


c = b * e

for nums in c:
    sums = 0
    tmp, counts = np.unique(nums, return_counts=True)
    for num in counts:
        sums += comb2(num)
    print(sums)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
 
from collections import Counter
c=Counter(a)
 
max_c=0			# max combination
for i in c.values():
    max_c+=i*(i-1)//2     # 6+1+1 = 8
 
for num in a:
    k=c[num]      # 4 2 4 2 2 4 2 4
 
    print(max_c-(k*(k-1)//2)+((k-1)*(k-2)//2)) # different from max combination
                # 8 - 6 + 3
                # 5
_ = input()
S = input().lstrip('.').rstrip('#')
n = len(S)

x = 0
y = S.count('.')
c = min(n-y, y)
for i in range(n):
  t = S[i]=='#':
  x += t
  y -= not t
  c = min(c, x+y)
print(c)

### FIXED CODE ###

_ = input()
S = input().lstrip('.').rstrip('#')
n = len(S)
A = list(S)

x = 0
y = S.count('.')
ans = min(n-y, y)
for i in range(n):
  if S[i] == '#':
    x += 1
  else:
    y -= 1
  ans = min(ans, x + y)
print(ans)
import sys, math
from collections import deque

readline = sys.stdin.readline

S = int(readline())

M = 10 ** 9
rS = math.ceil(math.sqrt(S))

while True:
    rem = rS ** 2 - S


    if rem <= M:
        b = rem
        break
    else:
        b = 0
        a = rem // M + 1
        c = math.floor(rem ** 0.5)
        while a < c and a < M:
            if rem % a == 0:
                b = a
                break
            a += 1
        if b != 0:
            break
    
    if rS >= M:
        rS = M - 1000
    else:
        rS += 1

if rS < 0 or b < 0 or rem // b > M:
    while True:
        a = 1

print('0 0 {} {} {} {}'.format(rS, b, rem // b, rS))

### FIXED CODE ###

import sys, math
from collections import deque

readline = sys.stdin.readline

S = int(readline())

M = 10 ** 9
rS = math.ceil(math.sqrt(S))

while True:
    rem = rS ** 2 - S

    if rem == 0:
        print('0 0 {} {} {} {}'.format(rS, 0, 0, rS))
        exit(0)

    if rem <= M:
        b = rem
        break
    else:
        b = 0
        a = rem // M + 1
        c = math.floor(rem ** 0.5)
        while a < c and a < M:
            if rem % a == 0:
                b = a
                break
            a += 1
        if b != 0:
            break
    
    if rS >= M:
        rS = M - 1000
    else:
        rS += 1


print('0 0 {} {} {} {}'.format(rS, b, rem // b, rS))
a=list(map(int, input().split()))

index = a.find(0)
print(index)

### FIXED CODE ###

c=list(map(int, input().split()))
for i in range(len(c)):
    if(c[i]==0):
        a = i+1
        print(a)
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]
c = 0

i = 0
while i <= N-1:
  S.append(S[i]+L[i])
  i += 1
  
i = 0
while S[i] <= X:
  if S[i]<= X:
    c += 1
    i += 1
  else:
    print(c)
    
print(c)

### FIXED CODE ###

N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]
c = 0

i = 0
while i <= N-1:
  S.append(S[i]+L[i])
  i += 1
  
j = 0
while j <= N:
  if S[j]<= X:
    c += 1
    j += 1
  
  else:
    j += 1

    
print(c)
c = a*b
if c % 2 == 0:
  print('Even')
else:
  print('Odd')


### FIXED CODE ###

a,b=map(int,input().split())
if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


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


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


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


def read_str():
    return input()


def main():
    H, A = read_int_list
    res = 0
    for i in range(n):
      H = H - A
      res += 1
    if H <= 0:
      break
    print(res)


main()


### FIXED CODE ###

import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


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


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


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


def read_str():
    return input()


def main():
    H, A = read_int_list()
    res = 0
    for i in range(10001):
      H = H - A
      res += 1
      if H <= 0:
        break
    print(res)


main()
import collections
N=int(input())
count=0
a=[]
while N>0:
  a.append(input())
  N=N-1
c=collection.Counter(a)
print(len(c))

### FIXED CODE ###

import collections
N=int(input())
count=0
a=[]
while N>0:
  a.append(input())
  N=N-1
c=collections.Counter(a)
print(len(c))
mod = 10**9+7
N,K = map(int,input().split())
dp = [[[0]*(K+1) for i in range(N+1)] for j in range(N+1)]
dp[0][0][0] = 1

for i in range(1,N+1):
    for j in range(N+1):
        for k in range(K+1):
            if k-2*j >= 0:
                dp[i][j][k] = (2*j+1)*dp[i-1][j][k-2*j]+(j+1)**2*dp[i-1][j+1][k-2*j]
                if j != 0:
                    dp[i][j][k] += dp[i-1][j-1][k-2*j]
            dp[i][j][k] %= mod

print(dp[N][0][K])

### FIXED CODE ###

mod = 10**9+7
N,K = map(int,input().split())
dp = [[[0]*(K+1) for i in range(N+1)] for j in range(N+1)]
dp[0][0][0] = 1

for i in range(1,N+1):
    for j in range(N+1):
        for k in range(K+1):
            if k-2*j >= 0:
                dp[i][j][k] = (2*j+1)*dp[i-1][j][k-2*j]
                if j != N:
                    dp[i][j][k] += (j+1)**2*dp[i-1][j+1][k-2*j]
                if j != 0:
                    dp[i][j][k] += dp[i-1][j-1][k-2*j]
            dp[i][j][k] %= mod

print(dp[N][0][K])
n = int(input())

if n[0]==9 or n[1]==9:
  print('Yes')
  
else:
  print('No')

### FIXED CODE ###

n = input()

if n[0]=='9' or n[1]=='9':
  print('Yes')
else:
  print('No')
totalnumber,numberfromfront=map(int, input().split())
numberfromback=totalnumber-numberfromfront+1
print(j)

### FIXED CODE ###

t,i = map(int,input().split(" "))
j=t-i+1 
print(j)
import math

def Lcm(a,b):
    return int(a*b/math.gcd(a,b))
def Kosu(min,max,k):
    if(min%k==0):
        tyousei=1
    return int(max/k)-int((min-1)/k)

min,max,a,b=map(int,input().split())
c=Lcm(a,b)
print(max+1-min-Kosu(min,max,a)-Kosu(min,max,b)+Kosu(min,max,c))

### FIXED CODE ###

import fractions

def Lcm(a,b):
    return a*b//fractions.gcd(a,b)
def Kosu(min,max,k):
    if(min%k==0):
        tyousei=1
    return max//k-(min-1)//k

min,max,a,b=map(int,input().split())
c=Lcm(a,b)
print(max+1-min-Kosu(min,max,a)-Kosu(min,max,b)+Kosu(min,max,c))
n = int(input())
A = [int(input()) for i in range(n)] 
 
counter = [0]*max(A)
cnt = 0
for a in A:
    counter[a-1] += 1
for c in counter:
    if c % 2 == 0 & c != 0:
        cnt += 1
print(cnt)

### FIXED CODE ###

N = input()
result = "No"
for i in N:
    if i == '9':
        result = "Yes"
print(result)
Sa, Sb, Sc = open(0).read().split()
print(Sa, Sb,Sc)
numSa = len(Sa)
numSb = len(Sb)
numSc = len(Sc)
i=j=k=0
flgA = True
flgB = flgC = False
while(True):
    if flgA == True:
        flgA = False
        if Sa[i] == "a":
            i+=1
            flgA = True
        elif Sa[i] == "b":
            j+=1
            flgB = True
        else:
            k+=1
            flgC = True
    elif flgB == True:
        flgB = False
        if Sb[j] == "a":
            i+=1
            flgA = True
        elif Sb[j] == "b":
            j+=1
            flgB = True
        else:
            k+=1
            flgC = True
    elif flgC == True:
        flgC = False
        if Sc[k] == "a":
            i+=1
            flgA = True
        elif Sc[k] == "b":
            j+=1
            flgB = True
        else:
            k+=1
            flgC = True
    else:
        pass
    
    if numSa==i:
        print("A")
        break
    elif numSb==j:
        pritn("B")
        break
    elif numSc==k:
        print("C")
        break
    else:
        pass

### FIXED CODE ###

Sa, Sb, Sc = open(0).read().split()
# print(Sa, Sb,Sc)
numSa = len(Sa)
numSb = len(Sb)
numSc = len(Sc)
# print(numSa,numSb,numSc)
i=j=k=0
flgA = True
flgB = flgC = False
l=0
# noDebug = False
while(True):
    if flgA == True:
#         print("A",i)
        flgA = False
        if numSa==i:
             print("A")
#             noDebug = True
             break
        if Sa[i] == "a":
            flgA = True
        elif Sa[i] == "b":
            flgB = True
        else:
            flgC = True
        i+=1
    elif flgB == True:
#         print("B",j)
        flgB = False
        if numSb==j:
            print("B")
#             noDebug = True
            break
        if Sb[j] == "a":
            flgA = True
        elif Sb[j] == "b":
            flgB = True
        else:
            flgC = True
        j+=1
    elif flgC == True:
#         print("C",k)
        flgC = False
        if numSc==k:
            print("C")
#             noDebug = True
            break
        if Sc[k] == "a":
            flgA = True
        elif Sc[k] == "b":
            flgB = True
        else:
            flgC = True
        k+=1
    else:
        pass
#     if noDebug == False:
#         print(l)
#         print(l,"::",Sa[i],i,Sb[j],j,Sc[k],k) 
#     l+=1
a, b = [int(x) for x in input().split()]
print(a * b - a - b + 1)

### FIXED CODE ###

a, b = [int(x) for x in input().split()]
print(a * b - a - b + 1)
a,b=input(),input()
l=len(a+b)
ans=""
for i in range(l):
  if i % 2 == 0:
    ans += a.pop(0)
  else:
    ans += b.pop(0)
print(ans)

### FIXED CODE ###

from itertools import zip_longest
print("".join(["".join(a) for a in zip_longest(input(),input(),fillvalue="")]))
from collections import defaultdict
n = int(input())
xy = [list(map(int, input().split())) for i in range(n)]
xy.sort()
s = defaultdict(int)
for i in range(n-1):
  s[(xy[i+1][0]-xy[i][0], xy[i+1][1]-xy[i][1])] += 1
m = max(s.values())
ans = 1 + (n-m-1)
print(ans)

### FIXED CODE ###

n = int(input())
xy = [tuple(map(int, input().split())) for i in range(n)]
ans = n

for i in range(n):
  for j in range(n):
    if i==j:
      continue
    xt = xy[i][0]-xy[j][0]
    yt = xy[i][1]-xy[j][1]
    tmp = n
    for k in range(n):
      if (xy[k][0]+xt, xy[k][1]+yt) in xy:
        tmp -= 1
    ans = min(ans, tmp)

print(ans)
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b):
    g = gcd(a,b)
    return a/g * b

n = int(input())

ans = 1
for i in range(n):
    t = int(input())
    ans = lcm(ans,t)

print(int(ans))

### FIXED CODE ###

import fractions

def lcm(a,b):
    g = fractions.gcd(a,b)
    return (a * b)//g

n = int(input())

ans = 1
for i in range(n):
    t = int(input())
    ans = lcm(ans,t)

print(ans)
import collections
n = int(input())
balls = []
for _ in range(n):
    x, y = map(int, input().split())
    balls.append([x, y])
# print(balls)
delta = []
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        delta.append((dx, dy))

c_delta = collections.Counter(delta)
# print(c_delta)
print(n-c_delta.most_common()[0][1])

### FIXED CODE ###

import collections
n = int(input())
balls = []
for _ in range(n):
    x, y = map(int, input().split())
    balls.append([x, y])
# print(balls)
delta = []
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        delta.append((dx, dy))

c_delta = collections.Counter(delta)
# print(c_delta)
if len(c_delta):
    print(n-c_delta.most_common()[0][1])
else:
    print(1)
#https://atcoder.jp/contests/keyence2019/tasks/keyence2019_d
#2019-01-13
import sys
P = 10**9 + 7
N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.sort(reverse = 1)
B.sort(reverse = 1)

if A[0] != N*M or B[0] != N*M:
    print(0)
    sys.exit()
for i in range(N-1):
    if A[i] == A[i+1]: 
        print(0)
        sys.exit()
for i in range(M-1):
    if B[i] == B[i+1]:
        print(0)
        sys.exit()

#大きい数字から順番に、おける場所が制限されている。
0/0

### FIXED CODE ###

#https://atcoder.jp/contests/keyence2019/tasks/keyence2019_d
#2019-01-13
import sys 
from collections import deque
P = 10**9 + 7
N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.sort(reverse = 1)
B.sort(reverse = 1)
A = deque(A)
B = deque(B)

if A[0] != N*M or B[0] != N*M:
    print(0)
    sys.exit()
for i in range(N-1):
    if A[i] == A[i+1]: 
        print(0)
        sys.exit()
for i in range(M-1):
    if B[i] == B[i+1]:
        print(0)
        sys.exit()

ans = 1
used_tate = []
used_yoko = []
oita = 0

p = A.popleft()
q = B.popleft()
#大きい数字から順番に、おける場所が制限されている。
for number in range(N*M, 0, -1):
    if number == p and number == q:
        used_tate += [1]
        used_yoko += [1]
        oita += 1
        try:
            p = A.popleft()
        except:
            p = 0
        try:
            q = B.popleft()
        except:
            q = 0
    elif number == p and number != q:
        used_tate += [1]
        ans *= len(used_yoko)
        oita += 1
        try:
            p = A.popleft()
        except:
            p = 0
    elif number != p and number == q:
        used_yoko += [1]
        ans *= len(used_tate)
        oita += 1
        try:
            q = B.popleft()
        except:
            q = 0
    else:
        ans *= len(used_tate)*len(used_yoko) - oita
        oita += 1
    ans = ans%P
print(ans)
# -*- coding: utf-8 -*-

def main():
    N, M = map(int,input().split())
    maxval = 10 ** (5 + 3 + 2)
    dp = [maxval] * (N ** 2)

    dp[0] = 0
    opened = set()
    opened.add(0)

    for Ki in range(M):
        a, b = map(int,input().split())
        c = 0
        clist = list(map(int,input().split()))
        for ci in clist:
            c |= 1 << (ci - 1)

        newopen = set()
        for op in opened:
            check = op | c
            chkval = dp[op] + a
            if dp[check] > chkval:
                dp[check] = chkval
                newopen.add(c)

        opened = opened | newopen
        
    ans = dp[-1]
    if ans == maxval:
        print(-1)
    else:
        print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

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

def main():
    N, M = map(int,input().split())
    maxval = 10 ** (5 + 3 + 2)
    dp = [maxval] * (2 ** N)

    dp[0] = 0
    opened = set()
    opened.add(0)

    for Ki in range(M):
        a, b = map(int,input().split())
        c = 0
        clist = list(map(int,input().split()))
        for ci in clist:
            c |= 1 << (ci - 1)

        newopen = set()
        for op in opened:
            check = op | c
            chkval = dp[op] + a
            if dp[check] > chkval:
                dp[check] = chkval
                newopen.add(check)
            newopen.add(c)

        opened = opened | newopen
        
    ans = dp[-1]
    if ans == maxval:
        print(-1)
    else:
        print(ans)


if __name__ == "__main__":
    main()
import math
A,B = map(int, input().split())
res = A*B
print(math.floor(res))

### FIXED CODE ###

import math
from decimal import *
exp = Decimal(10**23)
A,B = map(str, input().split())
res = int(A)*Decimal(B)
print(math.floor(res))
K,X = map(int,input().split())
A = []
for i in range(-K+1,K):
    A.append(int(X+i))
print(*A)
K,X = map(int,input().split())
A = []
for i in range(-K+1,K):
    A.append(int(X+i))
print(*A)


### FIXED CODE ###

K,X = map(int,input().split())
A = []
for i in range(-K+1,K):
    A.append(int(X+i))
print(*A)
n=int(input())
arr=[int(i) for i in input().strip().split(" ")]
t=int(input())
dic={}
sum_array=0
for i in arr:
    dic[i]=dic.get(i,0)+1
    sum_array+=i
    

for _ in range(t):
    a,b=[int(i) for i in input().split(" ")]
    if b in dic:
        dic[b]+=dic[a]
    else:
        dic[b]=dic[a]
    
    sum_array+=dic[a]*(b-a)
    print(dic,sum_array)
    dic[a]=0

### FIXED CODE ###

n=int(input())
arr=[int(i) for i in input().strip().split(" ")]
t=int(input())
dic={}
sum_array=0
for i in arr:
    dic[i]=dic.get(i,0)+1
    sum_array+=i
    

for _ in range(t):
    a,b=[int(i) for i in input().split(" ")]
    if a not in dic:
        print(sum_array)
        continue
    if b in dic:
        dic[b]+=dic[a]
    else:
        dic[b]=dic[a]
    
    sum_array+=dic[a]*(b-a)
    print(sum_array)
    dic[a]=0
s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]

for i,tt in enumerate(t[1:]):
  if i%2==1:
    dx.append(len(tt))
  else:
    dy.append(len(tt))

def is_ok(n,l):
  dp=[[False]*20001 for _ in range(len(l)+1)]
  n+=10000
  dp[0][10000]=True
  for i in range(1,len(l)+1):
    for j in range(20001):
      if j+l[i-1]<=20000:
        dp[i][j+l[i-1]]|=dp[i-1][j]
      if j-l[i-1]>=0:
        dp[i][j-l[i-1]]|=dp[i-1][j]
  if dp[len(l)][n]:
    return True
  else:
    return False

if is_ok(abs(x),dx) and is_ok(abs(y),dy):
  print("Yes")
else:
  print("No")


### FIXED CODE ###

s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]

for i,tt in enumerate(t[1:]):
  if i%2==1:
    dx.append(len(tt))
  else:
    dy.append(len(tt))

def is_ok(n,l):
  dp=set([0])
  for d in l:
    t=[]
    for v in dp:
      t.append(v+d)
      t.append(v-d)
    dp=set(t)
  return True if n in dp else False

if is_ok(x,dx) and is_ok(y,dy):
  print("Yes")
else:
  print("No")
a = int(input())
b = int(input())

if a > 2b:
  print(int(a - 2b))
else:
  print(0)

### FIXED CODE ###

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

if a < 2 *b:
    print(0)
else:
    print(a-2*b)
from operator import itemgetter
n = int(input())
A = input().split()
for i in range(n):
  A[i] = [int(A[i]),i+1]
A = sorted(A, key=itemgetter(0))
for a in A[:-1]:
  print(a[1],end=" ")
print(A[-1][1])

### FIXED CODE ###

n = int(input())
print( int((n+1)/2)/n )
n, k = input().split()
#k = input()
s = input()

word = s[k-1].lower()

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)


### FIXED CODE ###


n, k = map(int, input().split())
#k = input()
s = input()

word = s[k-1].lower()

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)
n, m = (int(xi) for xi in input().split())

a = []
diff = []
a0 = 0
a1 = int(input())
a.append(a1)
diff.append(a1+1)

for xi in range(m-1):
    a0 = a1
    a1 = int(input())
    a.append(a1)
    diff.append(a1-a0)

if a1==n-1:
    diff.append(n-a1+1)
else:
    diff.append(n-a1+1)

# print(diff)
# print(a)

p = [0]
p.append(1)
p.append(1)
for xi in range(3,n-m):
    p.append(p[xi-1]+p[xi-2])

# print(p)

# print(len(diff))
out = 1
for xi in range(len(diff)):
    out *= p[diff[xi]-1]

print(out% 1_000_000_007 )


### FIXED CODE ###

n, m = (int(xi) for xi in input().split())

a = []
diff = []
a0 = 0
if m>0:
    a1 = int(input())
    a.append(a1)
    diff.append(a1+1)

    if m>1:
        for xi in range(m-1):
            a0 = a1
            a1 = int(input())
            a.append(a1)
            diff.append(a1-a0)

    if a1==n-1:
        diff.append(n-a1+1)
    else:
        diff.append(n-a1+1)


else:
    if n==1: diff.append(n+1)
    diff.append(n+2)

# print(diff)
# print(a)

p = [0]
p.append(1)
p.append(1)
for xi in range(3,max(diff)+2):
    add = (p[xi-1]+p[xi-2])%1_000_000_007
    p.append(add)

# print(p)

# print(len(diff))
out = 1
for xi in range(len(diff)):
    out *= p[diff[xi]-1]

print(out% 1_000_000_007 )
A=input();print(sum(i!=j for i,j in zip(A,A[::-1])//2)

### FIXED CODE ###

A=input()
c=0
B=A[::-1]
for i in range(len(A)):
    if A[i]!=B[i]:
        c+=1
print(c//2)
N = int(input())
A = list(map(int,input().split()))


for i in range(max(A),1,-1):
    l = list(map(lambda x: x % i,A))
    if l.count(0) >= len(A)-1:
        print(i)
        break


### FIXED CODE ###

A,B,T = map(int,input().split())

print(T//A * B)
import math
A, B, C, D = map(int, input().split())


E = C * D // math.gcd(C, D)

X = (B//C - (A-1)//C)
Y = (B//D - (A-1)//D)
Z = (B//E - (A-1)//E)

print(E)
print(X)
print(Y)
print(Z)
print(B - (X+Y-Z)-A + 1)


### FIXED CODE ###

import fractions
A, B, C, D = map(int, input().split())
E = (C * D) // fractions.gcd(C, D)
print(B - ((B//C - (A-1)//C) + (B//D - (A-1)//D)-(B//E - (A-1)//E))-A + 1)
A, B = list(map(int, input().split())

if A == B:
    print(1)
elif A % 2 != B % 2:
    print("IMPOSSIBLE")
else:
    K = (A+B) // 2
    if abs(A-K) == abs(B-K):
        print(K)
    else:
        print("IMPOSSIBLE")


### FIXED CODE ###

ab = input().split()
A, B = int(ab[0]), int(ab[1])

if A == B:
    print(1)
elif A % 2 != B % 2:
    print("IMPOSSIBLE")
else:
    K = (A+B) // 2
    if abs(A-K) == abs(B-K):
        print(K)
    else:
        print("IMPOSSIBLE")
# import sys
# 
# input = sys.stdin.readline

foods = [int(input()) for _ in range(5)]

exist_remainder_list = [(food, food % 10) for food in foods if food % 10 != 0]

last = min(exist_remainder_list, key=lambda value: value[1])

foods.remove(last[0])

ans = 0

for index, food in enumerate(foods):
    ans += food
    while True:
        if ans % 10 == 0:
            break
        else:
            ans += 1

print(ans + last[0])


### FIXED CODE ###

import sys

input = sys.stdin.readline

foods = [int(input()) for _ in range(5)]

exist_remainder_list = [(food, food % 10) for food in foods if food % 10 != 0]

if len(exist_remainder_list) != 0:
    last = min(exist_remainder_list, key=lambda value: value[1])
    foods.remove(last[0])

    ans = 0

    for index, food in enumerate(foods):
        ans += food
        while True:
            if ans % 10 == 0:
                break
            else:
                ans += 1

    print(ans + last[0])
else:
    ans = 0

    for index, food in enumerate(foods):
        ans += food
        while True:
            if ans % 10 == 0:
                break
            else:
                ans += 1

    print(ans)