Harryxun/stf_run huggingface dataset:
a=list(map(int,input().split()))

a.sort()

s=0
i=0

if sum(a)<=x:
    print(n)
    exit()
elif min(a)>x:
    print(0)
    exit()
else:
    while s<x:
        s+=a[i]
        i+=1

print(i-1)

### FIXED CODE ###

n,x=map(int,input().split())

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

a.sort()

count=0
 
if x<a[0]:
    print(0)
    exit()


for i in range(n):
    if x>=a[i]:
        x-=a[i]
        count+=1
    else:
        print(count)
        exit()

if x>0:
    print(count-1)
else:
    print(count)
#ABC174A


X = int(input())

if X >= 30:
    peint('Yes')
else:
    print('No')

### FIXED CODE ###

#ABC174A


X = int(input())

if X > 29:
    print('Yes')
else:
    print('No')
import math

N = int(input())
A = [int(s) for s in input().split()]
ans = 0
L = [A[0]] * (N)
R = [A[-1]] * (N)
for n in range(1, N):
    L[n] = math.gcd(A[n], L[n-1])
    R[-(n+1)] = math.gcd(A[-(n+1)], R[-n])
for n in range(1, N-1):
    temp = math.gcd(L[n-1], R[n+1])
    ans = max(temp, ans)
print(ans)

### FIXED CODE ###

from fractions import gcd
N = int(input())
A = [int(s) for s in input().split()]
ans = 0
L = [0] * (N)
R = [0] * (N)
for n in range(0, N):
    if n != N-1:
        L[n+1] = gcd(A[n], L[n])
        R[-(n+2)] = gcd(A[-(n+1)], R[-(n+1)])
for n in range(0, N):
    temp = gcd(L[n], R[n])
    ans = max(temp, ans)
print(ans)
A,B,N = map(int,input().split())
x = math.gcd(N,B)
K = math.floor(N/B)
if K == 0:
    print(math.floor(A*N/B)-A*math.floor(N/B))
else:
    alpha = B*(K+1)-1
    if alpha > N:
        alpha = N
    print(math.floor(alpha/B)-A*math.floor(alpha/B))

### FIXED CODE ###

import math
def equation(a,b,n):
  return math.floor((a*n)/b)-a*math.floor(n/b)
d,e,f = map(int,input().split())
K = min(e-1,f)
print(equation(d,e,K))
n,k = map(int,input().split())
P = list(map(int,input().split()))
C = list(map(int,input().split()))
# g = [[0]*(n) for _ in range(n)]
# A = [n]*n
# for i in range(n):
#     tmp = 0
#     idx = i
#     cnt = 0
#     set_ =set()
#     while cnt<n:
#         if C[idx] not in set_:
#             tmp += C[idx]
#             set_.add(C[idx])
#             g[i][cnt] = tmp
#             idx = P[idx]-1
#             cnt += 1
#         else:
#             p = len(set_)
#             A[i] = p
#             break
ans = -float('inf')

for i in range(n):
    S = []
    idx = P[i]-1
    S.append(C[idx])
    while idx != i:
        idx = P[idx]-1
        S.append(S[-1] +C[idx])
    v,w = k//len(S),k%len(S)
    if k<=len(S):
        val = max(S[:k])
    elif S[-1]<=0:
        val - max(S)
    else:
        val1 = S[-1] *(k//len(S)-1)
        val1 += max(S)
        val2 = S[-1]*(k//len(S))
        if w!=0:
            val2 += max(0,max(S[:w]))
        val = max(val1,val2)
    ans = max(ans,val)
# for i in range(n):
#     v,w = k//A[i],k%A[i]
#     if A[i]<k:
#         if g[i][A[i]-1]<=0:
#             val = max(g[i][:A[i]])
#         else:
#             val1 = (v-1)*g[i][A[i]-1]
#             val1 += max(g[i][:A[i]])
#             val2 = v*g[i][A[i]-1]
#             if w!=0:
#                 val2 += max(0,max(g[i][:w]))
#             val = max(val1,val2)
#     else:
#         val = max(g[i][:k])
#     ans = max(ans,val)
print(ans)

### FIXED CODE ###

n,k = map(int,input().split())
P = list(map(int,input().split()))
C = list(map(int,input().split()))
g = [[0]*(n) for _ in range(n)]
A = [n]*n
# for i in range(n):
#     tmp = 0
#     idx = i
#     cnt = 0
#     set_ =set()
#     while cnt<n:
#         if C[idx] not in set_:
#             tmp += C[idx]
#             set_.add(C[idx])
#             g[i][cnt] = tmp
#             idx = P[idx]-1
#             cnt += 1
#         else:
#             p = len(set_)
#             A[i] = p
#             break
ans = -float('inf')

for i in range(n):
    S = []
    idx = P[i]-1
    S.append(C[idx])
    while idx != i:
        idx = P[idx]-1
        S.append(S[-1] +C[idx])
    v,w = k//len(S),k%len(S)
    if k<=len(S):
        val = max(S[:k])
    elif S[-1]<=0:
        val = max(S)
    else:
        val1 = S[-1] *(v-1)
        val1 += max(S)
        val2 = S[-1]*v
        if w!=0:
            val2 += max(0,max(S[:w]))
        val = max(val1,val2)
    ans = max(ans,val)
# for i in range(n):
#     v,w = k//A[i],k%A[i]
#     if A[i]<k:
#         if g[i][A[i]-1]<=0:
#             val = max(g[i][:A[i]])
#         else:
#             val1 = (v-1)*g[i][A[i]-1]
#             val1 += max(g[i][:A[i]])
#             val2 = v*g[i][A[i]-1]
#             if w!=0:
#                 val2 += max(0,max(g[i][:w]))
#             val = max(val1,val2)
#     else:
#         val = max(g[i][:k])
#     ans = max(ans,val)
print(ans)
import math
 
def dcos(x):
    return math.cos(math.radians(x))
 
A, B, H, M = map(int, input().split())
 
one_H = 360 / 12
one_M = 360 / 60
one_H_M = one_H / 60
 
#短針の動きのみ考える。
kakudo_H = one_H * H
#分針の動きを加える。
kakudo_H = kakudo_H + one_H_M*M
 
if kakudo_H > 180:
    kakudo_H = 360 - kakudo_H
 
kakudo_M = one_M * M
if kakudo_M > 180:
    kakudo_M = 360 - kakudo_M
 
kakudo = abs(kakudo_M - kakudo_H)
 
ans = A**2 + B**2 + (-2)*A*B*dcos(kakudo)

assert dcos(kakudo) > 0
 
print(ans**0.5)


### FIXED CODE ###

import math

a, b, h, m = list(map(int, input().split()))
deg_a = (60 * h + m) * (360 / (60 * 12))
deg_b = m * (360 / 60)
deg = abs(deg_a - deg_b)
rad = math.radians(deg)

c2 = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
print(c2 ** 0.5)
#sを最高のパターンにして，tを最悪のパターンにすればいい
#continueで強制的に次のループへ
s = list(input())
t = list(input())
condition = 0

s.sort()
t.sort()
t.reverse()

if len(s)  == len(t):
    pattern == -1
elif len(s) < len(t):
    length = len(s)
    pattern = 0
else:#sのほうが長い時 pattern = 1
    length = len(t)
    pattern = 1

if pattern == -1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] > t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
        if condition == 0:
            print("No")
elif pattern == 0:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    
    if condition == 0:
        print("Yes")
elif pattern == 1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            ccondition =1
            break
        else:
            print("No")
            condition =1
            break
    if condition == 0:
        print("No")
        
    



### FIXED CODE ###

#sを最高のパターンにして，tを最悪のパターンにすればいい
#continueで強制的に次のループへ
s = list(input())
t = list(input())
condition = 0

s.sort()
t.sort()
t.reverse()

if len(s)  == len(t):
    length = len(s)
    pattern = -1
elif len(s) < len(t):
    length = len(s)
    pattern = 0
else:#sのほうが長い時 pattern = 1
    length = len(t)
    pattern = 1

if pattern == -1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    if condition == 0:
        print("No")
elif pattern == 0:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    
    if condition == 0:
        print("Yes")
elif pattern == 1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
            
    if condition == 0:
        print("No")
X, A, B = map(int, iput().split())

def cake(X, A, B):
  X -= A
  a = X//B
  X -= a*B
  return X

print(cake(X))

### FIXED CODE ###

import sys

def main():
  input = sys.stdin.readline
  X = int(input())
  A = int(input())
  B = int(input())
  
  print((X-A)%B)
  
if __name__ == '__main__':
  main()
N,M = int(input().split())  ##Nが偶数　Mが奇数
all = N+M
ans = (N-1)*N/2
ans =ans + (M-1)*M/2
print(ans)


### FIXED CODE ###

N,M = map(int,input().split()) 
ans = (N-1)*N//2
ans =ans + (M-1)*M//2
print(ans)
n=int(input())
a=[int(i) for i in input().split]

total=0
for i in a:
    total+=i

hei=total/n

count=0
for i in a:
    if i <= hei:
        count+=1
        
print(count)


### FIXED CODE ###

while(1):
	n=int(input())
	if n==0:
		break	
	a=[int(i) for i in input().split()]

	total=0
	for i in a:
		total+=i
	
	hei=total/n
	count=0
	for i in a:
		if i <=hei:
			count+=1
	print(count)
N = int(input())
array=[int(n) for n in input().split()]
    lst=[]
    left_array=array[:N]
    right_array=array[-N:]
    for i in range(N+1):
        for j in range(i):
            new_a=array[N+j+1]
            old_a=min(left_array)
            new_b=array[-N-j-1]
            old_b=min(right_array)
            left_array.append(new_a)
            left_array.remove(old_a)
            right_array.append(new_b)
            right_array.remove(old_b)
    lst.append(sum(left_array)-sum(right_array))
    print(max(lst))

### FIXED CODE ###

N = int(input())
array = [int(n) for n in input().split()]
import copy
import heapq
lst = [None for i in range(N + 1)]
left_lst = copy.deepcopy(lst)
right_lst = copy.deepcopy(lst)
left_array = array[:N]
right_array= [-n for n in array[-N:]]
l_sum = sum(left_array)
r_sum = sum(right_array)
heapq.heapify(left_array)
heapq.heapify(right_array)
left_lst[0] = l_sum
right_lst[0] = r_sum

for k in range(N, 2 * N):
    new_a, new_b = array[k], array[-k - 1]*-1
    heapq.heappush(left_array,new_a)
    heapq.heappush(right_array,new_b)
    old_a = heapq.heappop(left_array)
    l_sum += (new_a - old_a)
    left_lst[k - N + 1] = l_sum
    old_b = heapq.heappop(right_array)
    r_sum += (new_b - old_b)
    right_lst[k - N + 1] = r_sum
lst = [ a + b for a, b in zip(left_lst, list(reversed(right_lst)))]
print(max(lst))
import sys
from collections import deque

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    h, w, k = nm()
    sy, sx, gy, gx = nm()
    d = [(0, 1), (1, 0), (-1, 0), (0, -1)]
    sx -= 1; sy -= 1
    gx -= 1; gy -= 1
    C = [ns() for _ in range(w)]
    G = [[10**10]*w for _ in range(h)]
    G[sy][sx] = 0
    q = deque([(sy, sx)])
    while q:
        y, x = q.popleft()
        for i in range(4):
            dy, dx = d[i]
            ny, nx = y, x
            for _ in range(k):
                ny += dy; nx += dx
                if ny < 0 or h <= ny or nx < 0 or w <= nx or C[ny][nx] == '@' or G[ny][nx] <= G[y][x]:
                    break
                if G[ny][nx] > G[y][x] + 1:
                    G[ny][nx] = G[y][x] + 1
                    q.append((ny, nx))
    ans = G[gy][gx]
    print(ans if ans < 10**10 else -1)
    return

solve()


### FIXED CODE ###

import sys
from collections import deque

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))


def solve():
    h, w, k = nm()
    sy, sx, gy, gx = nm()
    d = [(0, 1), (1, 0), (-1, 0), (0, -1)]
    sx -= 1; sy -= 1
    gx -= 1; gy -= 1
    C = [ns() for _ in range(h)]
    G = [[10**7]*w for _ in range(h)]
    G[sy][sx] = 0
    q = deque([(sy, sx)])
    while q:
        y, x = q.popleft()
        for i in range(4):
            dy, dx = d[i]
            ny, nx = y, x
            for _ in range(k):
                ny += dy; nx += dx
                if ny < 0 or h <= ny or nx < 0 or w <= nx:
                    break
                if C[ny][nx] == '@' or G[ny][nx] <= G[y][x]:
                    break
                if G[ny][nx] > G[y][x] + 1:
                    G[ny][nx] = G[y][x] + 1
                    q.append((ny, nx))
    ans = G[gy][gx]
    print(ans if ans < 10**7 else -1)
    return

solve()
import math
X,Y = [int(x) for x in input().split()]
lcm = X*Y//math.gcd(X,Y)
if(lcm//X<=2):
    print(-1)
else:
    print(X*2)


### FIXED CODE ###

import fractions as math
X,Y = [int(x) for x in input().split()]
lcm = X*Y//math.gcd(X,Y)
if(lcm==X):
    print(-1)
else:
    print(X)
import sys
import sqrt from numpy

args = sys.stdin.readline().split()
a = int(args[0])
b = int(args[1])
c = int(args[2])

result = sqrt(a) + sqrt(b) < sqrt(c)
if result:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import sys

argument = sys.stdin.readline()
args = argument.split()
a = int(args[0])
b = int(args[1])
c = int(args[2])

d = c - a - b

result = (d > 0) and 4 * a * b < d**2
if result:
    print("Yes")
else:
    print("No")
from collections import deque
import numpy as np

H, W = map(int, input().split())
sh, sw = map(int, input().split())
sh -= 1
sw -= 1
gh, gw = list(map(int, input().split()))
gh -= 1
gw -= 1
lst = []
for _ in range(H):
    lst.append(list(str(input())))
    
dx, dy = [1, 0, -1, 0], [0, 1, 0, -1]
visited = [[0]*W for _ in range(H)]

def dfs(sh, sw):
    global visited
    global flg
    flg = 0
    stack = deque([[sh, sw]])
    visited[sh][sw] = 1
    c = 0
    while stack:
        sh, sw = stack.pop()
        if sh == gh and sw  == gw:
            flg = 1
            break
        for i in range(4):
            nx = sh + dx[i]
            ny = sw + dy[i]
            if 0 > nx or nx >= H or 0 > ny or ny >= W:
                continue
            else:
                if lst[nx][ny] == '#' or visited[nx][ny] == 1:
                    continue
                else:
                    visited[nx][ny] = 1
                    stack.append([nx, ny])

c = lst.count('.')
ans = 0

dfs(sh, sw)

if visited[gh][gw]:
    print(ans)
ov = -1
nv = - 2
while ov != nv:
    ov = sum(visited[gh][gw], []).count(1)
    for h in range(H):
        for w in range (W):
            if visited[h][w] == 0 and lst[h][w] != '#':
                arr = np.array(visited)[max(0, h-2):min(H, h+3),max(0, w-2):min(W, w+3)].tolist()
                if sum(arr, []).count(1) >= 1:
                    ans += 1
                    dfs(h,w)
                    nv = sum(visited[gh][gw], []).count(1)
                    if flg:
                        break
                
if visited[gh][gw]:
    print(ans)
else:
    print(-1)

### FIXED CODE ###

import math
a, b, c = map(int, input().split())
n = math.ceil(a / b)
print(c * n)
a, b, c = list(map(int, input().split()))
if len(set(a, b, c)) == 2:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

a = list(map(int, input().split()))
if len(set(a)) == 2:
    print('Yes')
else:
    print('No')
A, B =nap(int, input().split())
print(A*B)

### FIXED CODE ###

A, B = map(int, input().split())
print(A*B)
import numpy as np


n,m,x = map(int, input().split())
lis = [np.asarray(list(map(int, input().split()))) for _ in range(n)]
lis = np.array(lis)

res = []
for i in range(2**n):
    t = np.array([0]*(m+1))
    for j in range(n):
        if ((i >> j) & 1):
            t += lis[j]
    res.append(t)

res = np.array(res)

z = 10**10

for i in res:
    if np.amin(i[1:m]) >= x and i[0] < z:
        z = i[0]

print(z if z != 10**10 else -1)

### FIXED CODE ###

import numpy as np
import math


n,m,x = map(int, input().split())
lis = [np.asarray(list(map(int, input().split()))) for _ in range(n)]
lis = np.array(lis)

res = []
for i in range(2**n):
    t = np.array([0]*(m+1))
    for j in range(n):
        if ((i >> j) & 1):
            t += lis[j]
    res.append(t)

res = np.array(res)

z = math.inf

for i in res:
    if np.amin(i[1:]) >= x and i[0] < z:
        z = i[0]

print(z if z != math.inf else -1)
W,H,x,y,r = input().split()
w = int()
H = int()
x = int()
y = int()
r = int()
if x + r < W, y + r < H:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

w,h,x,y,r = input().split()
w = int(w)
h = int(h)
x = int(x)
y = int(y)
r = int(r)
if x - r >= 0 and y - r >= 0 and x + r <= w and y + r <= h:
    print("Yes")
else:
    print("No")
s = input().split()
i = s[0]
m = s[1]
j = 0
el = input().split()
for p in el:
  if p < 1 / (4 * m):
    j = 1

if j == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input().split()
i = s[0]
m = int(s[1])
count = 0
sun = 0
el = input().split()
for p in el:
    sun += int(p)
for k in el:
    if int(k) >= sun / (4 * m):
        count += 1
if count >= m:
    print("Yes")
else:
    print("No")
n=int(input().split(" "))

if n[1]==1:
    return 0
else:
    return n[0]-n[1]

### FIXED CODE ###

n,k= [int(i) for i in input().split()]
if k==1:
    print (0)
else:
    print (n-k)
A,B=map(int,input().split())
if A%3==0 pr B%3==0 or (A+B)%3==0:
    print("Possible")
else:
    print("Impossible")


### FIXED CODE ###

A,B=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
    print("Possible")
else:
    print("Impossible")
a,b,c = map(int,raw_input().split(" "))
 
if a < b and b < c:
  print "Yes"
else:
  print "No"

### 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"
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
#import math

#N=int(input())
#X,Y=map(int,input().split())
#S=list(map(int,input().split()))
#S=[list(map(int,input().split())) for i in range(N)]



N,M=map(int,input().split())
sc=[list(map(int,input().split())) for i in range(M)]
dic={}
for s,c in sc:
    if not s in dic:
        dic.update({s:c})
    else:
        if dic[s]!=c:
            print(-1)
            exit()

data=""
for i in range(1,N+1):
    if i in dic:
        if not data and dic[i]==0:
            print(-1)
            exit()

    if i in dic and dic[i]!=0 or i==N:
        data+=str(dic[i])
    else:
        if data:
            data+="0"
if data:
    print(data)
else:
    print(-1)
#print(Counter(sc))


### FIXED CODE ###

from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
#import math

#N=int(input())
#X,Y=map(int,input().split())
#S=list(map(int,input().split()))
#S=[list(map(int,input().split())) for i in range(N)]



N,M=map(int,input().split())
sc=[list(map(int,input().split())) for i in range(M)]
dic={}
for s,c in sc:
    if not s in dic:
        dic.update({s:c})
    else:
        if dic[s]!=c:
            print(-1)
            exit()
if not 1 in dic:
    data="1"
    Z=2
else:
    Z=1
    data=""

if N==1 and not dic:
    print(0)
    exit()
if N>1 and 1 in dic and dic[1]==0:
    print(-1)
    exit()

for i in range(Z,N+1):
    if i in dic:
        data+=str(dic[i])
    else:
        if data:
            data+="0"
if data:
    print(data)
else:
    print(-1)
#print(Counter(sc))
s = input()
n = len(s)

cnt = 0
for i in range(n):
  if (s[i] != s[n - 1 - i]) 
  cnt+=1

print(cnt)


### FIXED CODE ###

s = input()
n = len(s)

cnt = 0
for i in range(n//2):
  if (s[i] != s[n - 1 - i]):
    cnt+=1

print(cnt)
from itertools import product 
n,a,b,c = map(int,input().split())
l = [int(input()) for _ in range(n)]
tar = [a,b,c]
ans = float("inf")
for p in product(range(4),repeat=8):
    mp = 0
    length = [0]*3
    for i,j in enumerate(p):
        if j == 3: continue
        if length[j] > 0: mp += 10
        length[j] += l[i]
    for i in range(3):
        if length[i] == 0: break
        mp += abs(length[i]-tar[i])
    else:
        ans = min(ans, mp)
print(ans)

### FIXED CODE ###

from itertools import product 
n,a,b,c = map(int,input().split())
l = [int(input()) for _ in range(n)]
tar = [a,b,c]
ans = float("inf")
for p in product(range(4),repeat=n):
    mp = 0
    length = [0]*3
    for i,j in enumerate(p):
        if j == 3: continue
        if length[j] > 0: mp += 10
        length[j] += l[i]
    for j in range(3):
        if length[j] == 0: break
        mp += abs(length[j]-tar[j])
    else:
        ans = min(ans, mp)
print(ans)
num=int(input())
if num[:-1]==0 or num[:-1]==1 or num[:-1]==6 or num[:-1]==0:
  print("pon")
elis num[:-1]==3:
  print("bon")
else:
  print("hon")

### FIXED CODE ###

n = input()
if n[-1] == "3":
    print("bon")
elif n[-1] == "0" or n[-1] == "1" or n[-1] == "6" or n[-1] == '8':
    print("pon")
else:
    print("hon")
import numpy as np 
x =[]
for i in range(5):
    x.append(int(input()))
x = np.array(x)
y = x.copy()
z = x%10
y[y%10 !=0] = y[y%10 !=0] + 10 - y[y%10 !=0]%10
minz = min(z[z%10!=0])

print(sum(y)-10+minz)

### FIXED CODE ###

import numpy as np 
x =[]
for i in range(5):
    x.append(int(input()))
x = np.array(x)
y = x.copy()
z = x%10
y[y%10 !=0] = y[y%10 !=0] + 10 - y[y%10 !=0]%10
if all(x%10==0):
    minz = 0
    print(sum(y))
else:
    minz = min(z[z%10!=0])
    print(sum(y)-10+minz)
import math
while t == 0:	
	try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		print("s")

### FIXED CODE ###

import math
t = 0
while t == 0:	
	try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		a = int (math.log10(x + y) + 1)
		print(a)
list1 = map(list(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list[1]+list[2])


### FIXED CODE ###

list1 = list(map(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list1[1]+list1[2])
M = input()
D = input()

count = 0
for i in range(2,int(D)+1):
    if len(str(i)) == 2:
        x = str(i)
        y = x[0:1]
        z = x[1:2]
        for j in range(2,int(M) + 1):
            if (int(y) * int(z) == j) and (int(z) != 1) and (int(y) != 1):
                count += 1
print(count)

### FIXED CODE ###

#入力が横に一行並んでるときはこうする↓
M,D = input().split()
 
count = 0
for i in range(2,int(D)+1):
    if len(str(i)) == 2:
        x = str(i)
        y = x[0:1]
        z = x[1:2]
        for j in range(2,int(M) + 1):
            if int(y) * int(z) == j and int(z) != 1 and int(y) != 1:
                count += 1
print(count)
n = int(input())
a = [n // 2 for n in map(int, input().split() if n % 2 == 0)]
print(sum(a))


### FIXED CODE ###

def f(n):
  c = 0
  while n % 2 == 0:
    c += 1
    n = n // 2
  return c
 
n = int(input())
a = list(map(int, input().split()))
print(sum((f(ai) for ai in a if ai % 2 == 0)))