Harryxun/stf_run huggingface dataset:
a, b = map(int, raw_input().split())

print a*b (a+b)*2

### FIXED CODE ###

a, b = [int(x) for x in raw_input().split()]
 
print a*b,(a+b)*2
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

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

blue = K
red = N-K

for i in range(1, blue+1):
    if red == 0:
        print(1)
    else:
        ans = cmb(blue-1, i-1) * cmb(red+1, i)
        print(ans%(10**9+7))


### FIXED CODE ###

from math import factorial

def cmb(n,k):
    if n < k or n < 0 or k < 0:
        return 0
    return factorial(n)//(factorial(k)*factorial(n-k))

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

for i in range(1, K+1):
    ans = cmb(K-1, i-1) * cmb(N-K+1, i)
    print(ans%(10**9+7))
N = int(input())
A = [int(i) for i in input().split()]

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

print(gcd(*A))

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]

def gcp(a,b):
    if b == 0:
        return a
    else:
        a,b = b,a%b
        return gcp(a,b)

a = A[0]
for i in range(1,N):
    a = gcp(a,A[i])
print(a)
N=int(input())
S=input()
r=S.count('R')
g=S.count('G')
b=S.count('B')
c=0
for i in range(N):
  for j in range(i+1,N):
    h=2*j-i
    if h<=N-1:
      if S[i]!=S[j] and S[i]!=S[h] and S[j]!=S[h]:
        c+=1
ans=r*g*b-c
print(ans)

### FIXED CODE ###

import math
K=int(input())
c=0
for i in range(1,K+1):
  for j in range(i,K+1):
    for k in range(j,K+1):
      a=math.gcd(i,j)
      b=math.gcd(a,k)
      if i==j==k:
        c+=b
      elif i==j or j==k:
        c+=3*b
      else:
        c+=6*b
print(c)
S=input()
print(S[0]+str(len(S-2))+S[-1])

### FIXED CODE ###

S=input()
print(S[0]+str(len(S)-2)+S[-1])
# coding: utf-8

from itertools import accumulate as accum
import sys
input = sys.stdin.readline

def f(N, s):
    MOD = int(1e9 + 7)
    dp = [[0] * N for _ in range(N)]
    for j in range(N):
        dp[0][j] = 1
    for i in range(1, N):
        dpi = dp[i]
        csum = list(accum(dp[i - 1], lambda x, y: (x + y) % MOD))
        csum_ = csum[N - i]
        for j in range(N - i):  # N-(i+1)+1 = N-i
            if s[i - 1] == "<":
                dpi[j] = (csum_ - csum[j]) % MOD
            else: #s[i-1] == ">"
                dpi[j] = csum[j]
    return(dp[-1][0])

N = int(input()) # 2 <= N <= 30000
s = input().rstrip() # len(s) = N - 1
print(f(N, s))



### FIXED CODE ###

# coding: utf-8

import sys
input = sys.stdin.readline

def f2(N, s):
    MOD = int(1e9 + 7)
    dp = [1] * N
    for i in range(1, N):
        csum = list(dp)
        for j in range(1, N - i + 1):
            csum[j] += csum[j - 1]
        csum_ = csum[N - i]
        i_ = i - 1
        for j in range(N - i):  # N-(i+1)+1 = N-i
            dp[j] = csum[j] if s[i_] == ">" else (csum_ - csum[j] + MOD) % MOD
    return(dp[0])

N = int(input()) # 2 <= N <= 30000
s = input().rstrip() # len(s) = N - 1
print(f2(N, s))
import itertools

#入力
N=int(input())
A = [int(x) for x in list(input())]
ans = 0
num=[[0]*10 for _ range(10)]

for i,j,k in itertools.combinations(A, 3):
    if(num[i][j][k] == 0):
        num[i][j][k] =1
        ans += 1
        
print(ans)

### FIXED CODE ###

# 入力
N = int(input())
A = [int(x) for x in list(input())]
ans = 0

AA = [x for x in range(10)]

for i in AA:
    for j in AA:
        for k in AA:
            v = [i, j, k]
            now=0
            temp=v[now]
            for l in A:
                if (l ==temp):
                    now += 1
                    if (now == 3):
                        # print(v)
                        break
                    temp = v[now]
            if (now == 3):
                ans += 1

print(ans)
from collections import defaultdict
import heapq

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

log_dict = defaultdict(int)
log_list = []
for i in a:
    log[i] += 1
    if -i not in log_list:
        log_list.append(-i)
        
heapq.heapify(log_list)


while True:
    l = heapq.heappop(log_list)
    if K > log_dict[l]:
        K -= log_dict[l]
        log_dict[l//2] += log_dict[l] * 2
        log_dict[l] = 0
        if l//2 not in log_list:
            heapq.heappush(log_list, l//2)

    else:
        print(int(log_dict/(K+1)))
        exit()
    


### FIXED CODE ###

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

ng = 0
ok = max(A)

while ok - ng > 1:
    cnt = 0
    l = (ok + ng) // 2
    for a in A:
        cnt += (a // l) + (a % l != 0) - 1

    if cnt <= K:
        ok = l
    else:
        ng = l
print(ok)
N = input()
string_list = input().rstrip().split()
l = [int(x) for x in string_list]
_max = 0
_min = l[0]
for t in l:
  if _max < t:
    _max = t
  if _min > t:
    _min = t  
return _max - _min

### FIXED CODE ###

N = input()
string_list = input().rstrip().split()
l = [int(x) for x in string_list]
_max = 0
_min = l[0]
for t in l:
  if _max < t:
    _max = t
  if _min > t:
    _min = t  
print(_max - _min)
from decimal import *
getcontext().prec = 100
a, b, c = map(int, input().split())
if Decimal(str((c - a - b) ** 2)) - Decimal(str(4 * a * b)) > 0:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

k = int(input())
arr = [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]
print(arr[k - 1])
m,n,o=map(int, raw_input().split())
print'Yes' if m<n<o else:print 'No'

### FIXED CODE ###

(m,n,o)=map(int, raw_input().split())
if m<n & n<o: print 'Yes'
else: print 'No'
N, K = map(int,input().split())

S = input()

SL = list(S)
SL[K] = SL[K].lower()
ans = "".join(SL)

print(ans)



### FIXED CODE ###

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

S = input()

SL = list(S)
SL[K-1] = SL[K-1].lower()
ans = "".join(SL)

print(ans)
[n,m] = [int(i) for i in input().split()]
ls = []
tmp1 = -1
tmp2 = 0
checker = 0
ans = []
for i in range(m):
    tmp2 = int(input())
    ls.append(tmp2)
    if tmp2 - tmp1 == 1:
        checker = 1
        print(0)
        break
    tmp1 = tmp2
#i番目までの道の数
if n == 1:
    if 1 in ls:
        print(0)
    else:
        print(1)
else:
    for i in range(1,n+1):
        if i == 1:
            #1段目が使える時
            if 1 not in ls:
                ans.append(1)
            else:
                ans.append(0)
        elif i == 2:
            #2段目が使える時
            if 1 not in ls and 2 not in ls:
                ans.append(2)
            else:
                ans.append(1)
        else:
            if i in ls:
                ans.append(0)
            else:
                ans.append((ans[i-3]+ans[i-2])%(10**9+7))
if checker == 0:
    print(ans[n-1])


### FIXED CODE ###

[n,m] = [int(i) for i in input().split()]
a = []
for i in range(m):
    a.append(int(input()))
ok = [0] * (n+1)
for i in range(m):
    ok[a[i]] = 1
dp = [0] * (n+1)
dp[0] = 1
if n > 1:
    for i in range(1,n+1):
        if ok[i] != 1:
            if i == 1:
                dp[i] = 1
            else:
                dp[i] = (dp[i-2]+dp[i-1])%(10**9+7)
        else:
            dp[i] = 0
    print((dp[n])%(10 ** 9 + 7))
else:
    if 1 in a:
        print(0)
    else:
        print(1)
for i in range(10):
 if N>1000:
  N-=1000
 if N<1000:
  break

print(1000-N)

### FIXED CODE ###

N=int(input())

for i in range(10):
 if N>1000:
  N-=1000
 if N<1000:
  break

print(1000-N)
N, A, B = map(int, input().split())
S = ''
a = 'b'*A+'r'*B
count=int(N/len(a))+N//len(a)
S = a*count
print(S[:N].count('b'))

### FIXED CODE ###

N, A, B = map(int, input().split())
d = N//(A+B)
p = N%(A+B)

S = d*A + min(p, A)
print(S)
mod = 10**9+7
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
for num in a:
  count[num] = -1
count[1] = 1
count[2] = 1
for i in range(2, n+1):
  if count[i] != -1:
    count[i] += (count[i-1] + count[i-2])%mod
  else:
    count[i] = 0
print(count)
print(count[-1])

### FIXED CODE ###

mod = 1000000007
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
count[1] = 1
count[0] = 1
for num in a:
  count[num] = -1

for i in range(1, n+1):
  if count[i] != -1:
    if i == 1:
      count[1] = 1
      continue
    count[i] = (count[i-1] + count[i-2])
    count[i] %= mod
  else:
    count[i] = 0
print(count[-1]%mod)
n=int(input())
res=0
a1=int(input())
if a1!=0:
  print(-1)
  exit()
a2=int(input())
for  i in range(n-2):
  if a2-a1>1:
    print("-1")
    exit()
  if a2<=a1:
    res+=a1
  a1=a2
  a2=int(input())
res+=a2
print(res)

### FIXED CODE ###

n=int(input())
res=0
a1=int(input())
if a1!=0:
  print(-1)
  exit()
try:a2=int(input())
except:
      print("0")
      exit()
for  i in range(n-2):
  if a2-a1>1:
    print("-1")
    exit()
  if a2<=a1:
    res+=a1
  a1=a2
  a2=int(input()) 
if a2-a1>1:
    print("-1")
    exit()
if a2<=a1:
    res+=a1
res+=a2
print(res)
from collections import deque
n=int(input())
A=deque(sorted([int(input()) for i in range(n)]))
B=deque([A.popleft()])

flag,ans=1,0
while len(A)!=0:
    if flag==1:L,R=A.pop(),A.pop()
    else:L,R=A.popleft(),A.popleft()

    if abs(L-B[0])+abs(R-B[-1])>abs(L-B[-1])+abs(R-B[0]):
        ans +=abs(L-B[0])+abs(R-B[-1])
        B.append(R)
        B.appendleft(L)
    else:
        ans +=abs(R-B[0])+abs(L-B[-1])
        B.append(L)
        B.appendleft(R)

    if len(A)==1:
        ans +=max(abs(B[0]-A[0]),abs(B[-1]-A[0]))
        break

    flag=flag*-1

print(ans)

### FIXED CODE ###

n=int(input())
a=[int(input())for _ in range(n)]
if n==2:print(abs(a[0]-a[1]));exit()
f=[-1]
for i in range(1,n-1-(n%2==0)):
  if i%2:f.append(2)
  else:f.append(-2)
if n%2:f+=[-1]
else:f+=[-2,1]
b=[]
c=[]
for i in f:
  b.append(i)
  c.append(-i)
b.sort()
c.sort()
sb=sc=0
a.sort()
for i in range(n):
  sb+=a[i]*b[i]
  sc+=a[i]*c[i]
print(max(sb,sc))
s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d =< X:
  d += L[a]
  a += 1 
print(a)
  

### FIXED CODE ###

s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d <= X:
  if a >= N:
    a = N+1
    break
  else:
    d += L[a]
    a += 1 

print(a)
N = int(input())
S = input()
ctr = 0
for i in range (N):
  if S(i) == 'A' and S(i+1) == 'B' and S(i+2) == 'C':
    ctr += 1
print(ctr)

### FIXED CODE ###

N = int(input())
S = input()
print(S.count('ABC'))
N = int(input())
A= N//1000
B = (N - A*1000) //100
C = (N - A*1000 - B*100) // 10
D = N - A*1000 - B*100 - C*10
if A = B = C:
 print("Yes")
elif B=C=D:
 print("Yes")
else:
 print("No")

### FIXED CODE ###

N = int(input())
A= N//1000
B = (N - A*1000) //100
C = (N - A*1000 - B*100) // 10
D = N - A*1000 - B*100 - C*10
if A == B == C:
 print("Yes")
elif B==C==D:
 print("Yes")
else:
 print("No")
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, M = MAP()
dp = [INF]*(1<<N)
dp[0] = 0

for _ in range(M):
	a, b = MAP()
	c = LIST()
	d = 0
	for x in c:
		d += 1<<(x-1)

	for j in range(1<<N):
		tmp = j|d
		dp[tmp] = min(dp[tmp], dp[j]+a)

if dp[-1] == INF:
	print(-1)
else:
	print(dp[-1])


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
if N % 2 == 0:
	print(0.5)
else:
	print(((N+1)*1/2)/N)
def f(n, a):
  if 0 in a:
    return 0
  p = 1
  for x in a:
    p *= x
    if p > 10**18:
      return -1
  return p

n = int(input())
a = list(int, input().split())
print(f(n, a))

### FIXED CODE ###

def f(n, a):
  if 0 in a:
    return 0
  p = 1
  for x in a:
    p *= x
    if p > 10**18:
      return -1
  return p
 
n = int(input())
a = list(map(int, input().split()))
print(f(n, a))
N, Y = map(int, input().split())

for a in range(n + 1):
    for b in range(n - a + 1):
        c = n - a - b
        if 10000*a+5000*b+1000*c == Y:
            print(a,b,c)
            exit()
                
print(-1,-1,-1)


### FIXED CODE ###

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

for a in range(N + 1):
    for b in range(N - a + 1):
        c = N - a - b
        if 10000*a+5000*b+1000*c == Y:
            print(a,b,c)
            exit()
                
print(-1,-1,-1)
s = input()
num = 0
for _ in range(len(s)):

    if s == '+':
        num += 1
    else:


### FIXED CODE ###

s = input()
num = 0

for i in range(len(s)):
    num = num + 1 if  s[i] == '+' else num - 1

print(num)
import math

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

for i in range(N):
    A[i]-=i+1
A.sort()
a=N//2

def sad(A,a):
    sadness=0
    for i in range(N):
        sadness+=abs(A[i]-A[a])
    return sadness

print(min(sad(A,a),sad(A,a+1)))

### FIXED CODE ###

import math

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

for i in range(N):
    A[i]-=i+1
A.sort()
a=N//2

def sad(A,a):
    sadness=0
    for i in range(N):
        sadness+=abs(A[i]-A[a])
    return sadness

if N%2==0:
    ans=min(sad(A,a),sad(A,a+1))
else:
    ans=sad(A,a)
print(ans)
S = input()
if "A" ib S and "B" in S:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
if "A" in S and "B" in S:
  print("Yes")
else:
  print("No")
S=list(input())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[1])

### FIXED CODE ###

S=list(input())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[count])
import numpy as np
s = input()
print(0) if int(s) < 2019 else print(sum(np.mod(int(s[j:i+j]), 2019) == 0 for i in range(4, len(s)) for j in range(len(s)-i+1)))

### FIXED CODE ###

import numpy as np

s = input()[::-1]
length = len(s)
a = np.zeros(length, dtype=int)
d = np.zeros(length, dtype=int)
ans = np.zeros(2019, dtype=int)
x = 10

a[0] = int(s[0])
d[0] = a[0]
ans[d[0]] += 1

for i in range(1, length):
    a[i] = int(s[i]) * x % 2019
    d[i] = (d[i-1] + a[i]) % 2019
    ans[d[i]] += 1
    x = x * 10 % 2019

ans_c = ans[np.nonzero(ans)]

print(int(sum([ans_c[i] * (ans_c[i]-1) for i in range(ans_c.shape[0])]) / 2) + ans[0])
a,b,c=map(int,input().split())
if c-a-b<0:
	print("No")
    exit()
if (c-a-b)*(c-a-b)>4*a*b:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import math
a,b,c=map(int,input().split())
if c-a-b<0:
    print("No")
    exit()
if (c-a-b)*(c-a-b)>4*a*b:
    print("Yes")
else:
    print("No")
X = int(input())

for i in range(X):
    for j in range(2, X):
        if X >= i**j:
            ans = i**j
        else:
            break
print(ans)

### FIXED CODE ###

X = int(input())
ans = 1
for b in range(1,X):
    for p in range(2, X):
        if X < b**p:
            break
        if ans < b**p:
            ans = b**p
print(ans)
nums = map(int, input().split(' '))
nums.sort()
map(-nums[0], nums)
print(nums[2] - nums[1])

### FIXED CODE ###

nums = list(map(int, input().split(' ')))
nums.sort()
buf = nums[0]
nums = list(map(lambda x: x - buf, nums))
print(nums[2])
# coding: utf-8

def triangles(L, s, c, n):
    if c == len(L):
        return(n)
    if L[c] < s:
        n += 1
        return(triangles(L, s, c + 1, n))
    else:
        return(n)

N = int(input())
L = sorted(list(map(int, input().split())))
ans = 0
dp = []
for i in range(L[-2] + L[-1] + 1):
    dp.append(-1)
for i in range(N):
    for j in range(i + 1, N - 1):
        if dp[L[i] + L[j]] >= 0:
            ans += dp[L[i] + L[j]]
        else:
            dp[L[i] + L[j]] = triangles(L, L[i] + L[j], j + 1, 0)
            ans += dp[L[i] + L[j]]
print(ans)

### FIXED CODE ###

# coding: utf-8
import bisect

N = int(input())
L = sorted(list(map(int, input().split())))
ans = 0
for i in range(N):
    for j in range(i + 1, N - 1):
        ans += max(bisect.bisect_right(L, L[i] + L[j] - 1) - j - 1, 0)
print(ans)
X, Y = map(int,input().split())
def combination(n,r,mod=10**9+7):
    n1 = n+1
    r = min(r,n-r)
    numer = denom = 1
    for i in range(1,r+1):
        numer = numer * (n1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom,mod-2,mod) % mod

#y=2x以下かつy=(1/2)x以上の位置にいなくてはいけない
if (X+Y) % 3 != 0 or not (X<=2*y and Y <=2*X):
    ans = 0
else:
    N = (X+Y)//3
    r = Y - N
    ans = combination(N,r)
print(ans)

### FIXED CODE ###

X, Y = map(int,input().split())
def combination(n,r,mod=10**9+7):
    n1 = n+1
    r = min(r,n-r)
    numer = denom = 1
    for i in range(1,r+1):
        numer = numer * (n1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom,mod-2,mod) % mod

#y=2x以下かつy=(1/2)x以上の位置にいなくてはいけない
if (X+Y) % 3 != 0 or not (X<=2*Y and Y <=2*X):
    ans = 0
else:
    N = (X+Y)//3
    r = Y - N
    ans = combination(N,r)
print(ans)
N = int(input())
h = list(map(int, input().split()))
h.append(0)

res = 0
while True:
    for i in range(N):
        if h[i] > 0:
            l = i
            break
    for j in range(i+1, N+1):
        if h[j] == 0:
            r = j
            break
    
    x = min(h[l:r])
    for i in range(l, r):
        h[i] -= x
    res += x

    if max(h) == 0:
        break

print(res)


### FIXED CODE ###

N = int(input())
h = list(map(int, input().split()))
h.append(0)

res = 0
while True:
    if max(h) == 0:
        break
    for i in range(N):
        if h[i] > 0:
            l = i
            break
    for j in range(i+1, N+1):
        if h[j] == 0:
            r = j
            break
    
    x = min(h[l:r])
    for i in range(l, r):
        h[i] -= x
    res += x

print(res)
from collections import defaultdict


def dfs(to, fr, score):
    score += scores[to]
    ans[to] = score
    for u in adjacent[to]:
        if u == fr:
            continue
        dfs(u, to, score)


N, Q = map(int, input().split())
adjacent = defaultdict(list)
for i in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    adjacent[a].append(b)
    adjacent[b].append(a)
scores = [0] * N
for i in range(Q):
    p, x = map(int, input().split())
    p -= 1
    scores[p] += x

ans = [0] * N
dfs(0, -1, 0)
print(' '.join([str(ans[i]) for i in range(N)]))


### FIXED CODE ###

from collections import defaultdict, deque

N, Q = map(int, input().split())
adjacent = defaultdict(list)
for i in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    adjacent[a].append(b)
    adjacent[b].append(a)
ans = [0] * N
for i in range(Q):
    p, x = map(int, input().split())
    p -= 1
    ans[p] += x

q = deque([(0, -1)])
while len(q) > 0:
    u, p = q.pop()
    for v in adjacent[u]:
        if v == p:
            continue
        ans[v] += ans[u]
        q.appendleft((v, u))
print(' '.join([str(ans[i]) for i in range(N)]))
K = int(input())

if K%2 == 0:
  even_num = odd_num = K/2
eles:
  even_num = K/2
  odd_num = even_num + 1

print(even_num * odd_num)

### FIXED CODE ###

K = int(input())

if K%2 == 0:
  even_num = odd_num = K//2
else:
  even_num = K//2
  odd_num = even_num + 1

print(even_num * odd_num)
n, l = map(int, input().split())
pie = 0
min_aji = 100
for i in range(1, n+1):
    aji = l + i - 1
    pie += aji
    if abs(aji) < min_aji:
        min_aji = abs(aji)
        apple = i
        
pie -= l + apple -1

print(pie)

### FIXED CODE ###

n, l = map(int, input().split())
aji = []

for i in range(1, n+1):
    aji.append(l + i - 1)

aji.sort(key=abs)
print(sum(aji[1:]))
n = int(input())
s = [int(input()) for i in range(n)]
if sum(s)%10:
    print(sum(s))
else:
    for i in sorted(s):
        if i%10:
            print(sum(s)-i)
            break
    else:
        print(0

### FIXED CODE ###

n = int(input())
s = [int(input()) for i in range(n)]
if sum(s)%10:
    print(sum(s))
else:
    for i in sorted(s):
        if i%10:
            print(sum(s)-i)
            break
    else:
        print(0)
n = int(input())
s = list(n)

if n % sum(s):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())
s = sum(map(int, list(str(n))))

if n % s == 0:
  print("Yes")
else:
  print("No")
import sys
from collections import Counter
m = Counter(sys.stdin.read.lower())
for i in 'abcdefghijklmnopqrstuvwxyz':
    print(i, ":", m[i])


### FIXED CODE ###

import sys
from collections import Counter
m = Counter(sys.stdin.read().lower())
for i in 'abcdefghijklmnopqrstuvwxyz':
    print(i, ":", m[i])
i = 1
while True:
    x = int(input().strip())
    if x == 0:
        break
    else:
        print "Case {0} : {1}".format(i,x)
        i += 1

### FIXED CODE ###

i = 1
while True:
    x = int(input().strip())
    if x == 0:
        break
    else:
        print ("Case {}: {}".format(i,x))
        i += 1
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = input()
score = {"r":P, "s":R, "p":S} 
m = {"r":"p", "s":"r", "p":"s"}
mm = []
ans = 0
print(score)
#添字は0から始まることに注意
#r : 0 s : 1 p : 2

for i in range(N):
    if i <= K-1:
        ans += score[T[i]]
        mm.append(m[T[i]])
        print(mm)
    else:
        if m[T[i]] != mm[i-2]:
            ans += score[T[i]]
            mm.append(m[T[i]])
        
                 
print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())


ans = 0
commands = [''] * N
for i, t in enumerate(T):
    if t == 'r':
        command = 'p'
        point = P

    elif t == 's':
        command = 'r'
        point = R

    elif t == 'p':
        command = 's'
        point = S

    if (i - K >= 0) and (commands[i -  K] == command):
        command = ''
        point = 0

    ans += point
    commands[i] = command

print(ans)
N,Q = map(int,input().split())
ab = [ list(map(int,input().split())) for i in range(N-1) ]
px = [ list(map(int,input().split())) for i in range(Q) ]
a = [ab[i][0] for i in range(N-1)]
b = [ab[i][1] for i in range(N-1)]
dic = {}
dic2={}
dic3={}

for i in range(N):
    dic[i+1] = []
    dic2[i+1] = 0
for i in range(N-1):
    tmp1 = a[i]
    tmp2 = b[i]
    dic[tmp1].append(tmp2)
for i in range(Q):
    tmp1 = px[i][0]
    tmp2 = px[i][1]
    dic2[tmp1] += tmp2
def rec(now_node,prevval):
    nowval = prevval + dic2[now_node]
    dic3[now_node] = nowval
    for elem in dic[now_node]:
        rec(elem,nowval)
rec(1,0)
res = [str(dic3[i]) for i in range(1,N+1)]
print(' '.join(res))


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N,Q = map(int,input().split())
ab = [ tuple(map(int,input().split())) for i in range(N-1) ]
px = [ tuple(map(int,input().split())) for i in range(Q) ]
dic = {}
dic2=[0]*(N+1)
dic3=[0]*N

for i in range(N):
    dic[i+1] = []
for i in range(N-1):
    tmp1 = ab[i][0]
    tmp2 = ab[i][1]
    dic[tmp1].append(tmp2)
    dic[tmp2].append(tmp1)
ab=0
for i in range(Q):
    dic2[px[i][0]] += px[i][1]
px=0
def rec(now_node,prevval):
    nowval = prevval + dic2[now_node]
    dic3[now_node-1] = nowval
    tg_list = dic[now_node][:]
    for elem in tg_list:
        dic[elem].remove(now_node)
        rec(elem,nowval)
rec(1,0)
res = [str(dic3[i-1]) for i in range(1,N+1)]
print(' '.join(res))