Harryxun/stf_run huggingface dataset:
[print(a*b//2)for a,b,_ in[[*map(int,input().split())]]]

### FIXED CODE ###

[print(a*b//2) for a,b,_ in [sorted(map(int, input().split()))]]
def acinput():
    return list(map(int, input().split(" ")))


import heapq

N,M=acinput()

ab=[]
for i in range(N):
    ab.append(acinput())

#ab=sorted(ab,key=lambda x:x[1],reverse=True)
ab=sorted(ab,key=lambda x:x[0])


res=0
do=[0]*(M+1)
nowdate=M-1

koho=[]
k=0
while True:
    #print(k)
    i=k
    while True:
        if i>=len(ab):
            k=10**8
            break
        if ab[i][0]+nowdate>M:
            k=i
            break
        #koho=np.append(koho,ab[i][1])
        heapq.heappush(koho,-ab[i][1])
        i+=1
    #print(koho)

    tmp=heapq.heappop(koho)
    #print(tmp)
    res+=(-tmp)
    nowdate-=1
    if nowdate<0:
        break
    

print(int(res))

#print(do)
'''
3 6
4 5
4 3
6 4

'''

### FIXED CODE ###

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


import heapq

N,M=acinput()

ab=[]
for i in range(N):
    ab.append(acinput())

#ab=sorted(ab,key=lambda x:x[1],reverse=True)
ab=sorted(ab,key=lambda x:x[0])
#print(ab)

res=0
do=[0]*(M+1)
nowdate=M-1

koho=[]
k=0
while True:
    #print(k)
    #print(nowdate)
    i=k
    while True:
        if i>=len(ab):
            k=10**10
            break
        if ab[i][0]+nowdate>M:
            k=i
            break
        #koho=np.append(koho,ab[i][1])
        heapq.heappush(koho,-ab[i][1])
        i+=1
    #print(koho)
    try:
        tmp=heapq.heappop(koho)
        res+=(-tmp)
    except:
        pass

    
    nowdate-=1
    if nowdate<0:
        break
    

print(int(res))
# coding: utf-8

num = int(input())
from sympy import sieve
prime_list = [i for i in sieve.primerange(2,num + 1)]
from sympy import nextprime
if num in prime_list:
    print(nextprime(num - 1))
else:
    print(nextprime(num))

### FIXED CODE ###

# coding: utf-8

import math

def get_primenumber(number):
    prime_list = []
    
    search_list = list(range(2,number+1))
    while True:
      
      if search_list[0] > math.sqrt(number):
        
        prime_list.extend(search_list)
        break
      else:
        
        head_num = search_list[0]
        prime_list.append(head_num)
        
        search_list.pop(0)
        
        search_list = [num for num in search_list if num % head_num != 0]
    return max(prime_list)

    
a = int(input())
r_before = get_primenumber(a)
s_after = get_primenumber(a)
count = a + 1
if a != r_before:
    while r_before == s_after:
        s_after = get_primenumber(count)
        count += 1
    
print(s_after)
def InsertionSort(A, N, g):
    global cnt
    for i in range(g, N):
        key = A[i]
        j = i-g
        while j >= 0 and A[j] > key:
            A[j+g] = A[j]
            j = j-gdef InsertionSort(A, N, g):
    global cnt
    for i in range(g, N):
        key = A[i]
        j = i-g
        while j >= 0 and A[j] > key:
            A[j+g] = A[j]
            j = j-g
            cnt += 1    
        A[j+g] = key
    return A

def ShellSort(A, N):
    G = [len(A)//2]
    i = 0
    while True:
        G.append(G[i]//2)
        i += 1
        if G[i] == 1:
            break
    for i in range(len(G)):
        InsertionSort(A, N, G[i])
    return G

N = int(input())
A = []
cnt = 0
for i in range(N):
    A.append(int(input()))
ShellSort(A,N)
print(len(ShellSort(A,N)))
print(*ShellSort(A,N))
print(cnt)
print(*A, sep='\n')
            cnt += 1    
        A[j+g] = key
    return A

def ShellSort(A, N):
    G = [len(A)//3*3]
    i = 0
    while True:
        G.append(G[i]//3)
        i += 1
        if G[i] == 1:
            break
    for i in range(len(G)):
        InsertionSort(A, N, G[i])
    return G

N = int(input())
A = []
cnt = 0
for i in range(N):
    A.append(int(input()))
ShellSort(A,N)
print(len(ShellSort(A,N)))
print(*ShellSort(A,N))
print(cnt)
print(*A, sep='\n')

### FIXED CODE ###

import math
def InsertionSort(A, N, g):
    global cnt
    for i in range(g, N):
        key = A[i]
        j = i-g
        while j >= 0 and A[j] > key:
            A[j+g] = A[j]
            j = j-g
            cnt += 1    
        A[j+g] = key
    return A

def ShellSort(A, N):
    G = []
    i = 1
    while True:
        if  3**i -1 > N*2:
            break
        G.insert(0, int((3**i-1)/2))
        i += 1


    for i in range(len(G)):
        InsertionSort(A, N, G[i])
    return G

N = int(input())
A = []
cnt = 0
for i in range(N):
    A.append(int(input()))
ShellSort(A,N)
print(len(ShellSort(A,N)))
print(*ShellSort(A,N))
print(cnt)
print(*A, sep='\n')
S=input()
if S[0]==S[1] and S[1]==S[2]:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

S=input()
if S[0]==S[1] and S[1]==S[2]:
    print('No')
else:
    print('Yes')
import math
a, b = (int(i) for i in input().split())
x = math.ceil(a / 0.08)
flag = False
if (math.floor(x * 0.1) == b):
    flag = True
else:
    while math.floor(x * 0.08) == a:
        x = x + i
        if (math.floor(x * 0.1) == b):
            flag = True
            break
if flag:
    print(int(x))
else:
    print(-1)

### FIXED CODE ###

import math
a, b = (int(i) for i in input().split())
x = math.ceil(a / 0.08)
flag = False
while math.floor(x * 0.08) == a:
    if (math.floor(x * 0.1) == b):
        flag = True
        break
    x = x + 1
if flag:
    print(int(x))
else:
    print(-1)
H, W = map(int, input().split())
A = [input() for i in range(H)]

visited = [[False]*W for i in range(H)]
visited[0][0] = True
d = [[0, 0], [-1, -1]]
while d:
  x, y, px, py = d.pop()
  num = 0
  flag = False
  for dx, dy in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
    if 0<=x+dx<H and 0<=y+dy<W and [x+dx, y+dy]!=[px, py] and A[x+dx][y+dy]=='#' and not visited[x+dx][y+dy]:
      visited[x+dx][y+dy] = True
      num += 1
      d.append([x+dx, y+dy, x, y])
      if dx < 0 or dy < 0:
        flag = True
  if (num >= 2) or flag:
    print('Impossible')
    quit()

print('Possible')

### FIXED CODE ###

H, W = map(int, input().split())
A = [input() for i in range(H)]

visited = [[False]*W for i in range(H)]
visited[0][0] = True
d = [[0, 0, -1, -1]]
while d:
  x, y, px, py = d.pop()
  num = 0
  flag = False
  for dx, dy in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
    if 0<=x+dx<H and 0<=y+dy<W and [x+dx, y+dy]!=[px, py] and A[x+dx][y+dy]=='#' and not visited[x+dx][y+dy]:
      visited[x+dx][y+dy] = True
      num += 1
      d.append([x+dx, y+dy, x, y])
      if dx < 0 or dy < 0:
        flag = True
  if (num >= 2) or flag:
    print('Impossible')
    quit()

print('Possible')
n,x=map(int, input().split())

memo = {0:'p'}
def f(m):
    if m in memo:
        return memo[m]
    tmp =  'b' + f(m-1) + 'p' + f(m-1) + 'b'
    memo[m] = tmp
    return tmp

print(len([i for i in f(n)[:x] if i == 'p']))

### FIXED CODE ###

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

memol = {0: 1}
memop = {0: 1}


for i in range(1, n+1):
    memol[i] = memol[i-1] * 2 + 3
    memop[i] = memop[i-1] * 2 + 1

ret = 0
ln = 0
for i in range(n, -1, -1):
    if ln >= x:
        break
    ln += 1
    if ln >= x:
        break
    if ln + memol[i-1] > x:
        continue
    ln += memol[i-1]
    ret += memop[i-1]
    if ln == x:
        break
    ln += 1
    ret += 1
    if ln + memol[i-1] > x:
        continue
    ln += memol[i-1]
    ret += memop[i-1]
    if ln == x:
        break
    ln += 1

print(ret)
def f(c):
  if c == "1":
    return "9"
  elif c == "9":
    return 1
  else:
    return c
  
print(''.join(list(map(f, input()))))

### FIXED CODE ###

f = lambda c : "1" if c == "9" else "9"
  
print(''.join(list(map(f, input()))))
import numpy as np
#数値型を分割して取り出し
A, V = map(int, input().split())
B, W = map(int, input().split())
#数値型の取り出し
T = int(input())
AA = A
BB = B
u = np.array([i for i in range(1,T)])
#print(u)

ans = "NO"
for i in u:
  if BB >= AA:
    AA += V
    BB += W
  else:
    AA -= V
    BB -= W
  if AA == BB:
    ans = "YES"
    break
print(ans)

### FIXED CODE ###

#文字型の取り出し
s = input()

print(s[:3])
import math
a, b = map(double, input().split())
c = int(math.floor(a * b))
print(c)

### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
a, b= input().split()
a = int(a)
b = int(b.replace(".", ""))
# floatをそのまま掛け算すると大きい計算で誤差が生じるため、.を消してintにする。
output = a * b // 100
# 小数点は2桁までで確定なので、100で切り捨て除算する。
print(output)
import numpy as np
N, K = map(int, input().split(" "))
p = np.array(list(map(int, input().split(" "))))
ex = np.array([(i + 1) / 2 for i in p])
ans = np.sum(ex[0: K])
max_ans = ans
for i in range(K, N):
    diff = ex[i] - ex[i - K]
    ans += diff
    if diff > 0:
        max_ans = ans
print(max_ans)

### FIXED CODE ###

s, t = input().split(" ")
a, b = map(int, input().split(" "))
if input() == s:
    print(a - 1, b)
else:
    print(a, b - 1)
import networkx as nx
import matplotlib.pyplot as plt
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n, m = LI()
G = [[] for _ in range(n)]
H = LI()
for _ in range(m):
    a, b = LI()
    G[a - 1] += [b - 1]
    G[b - 1] += [a - 1]

ans = 0
for i in range(n):
    j = H[i]
    for v in G[i]:
        if H[v] >= j:
            break
    else:
        ans += 1

print(ans)

### FIXED CODE ###

from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n, m = LI()
G = [[] for _ in range(n)]
H = LI()
for _ in range(m):
    a, b = LI()
    G[a - 1] += [b - 1]
    G[b - 1] += [a - 1]

ans = 0
for i in range(n):
    j = H[i]
    for v in G[i]:
        if H[v] >= j:
            break
    else:
        ans += 1

print(ans)
import sys
n = int(input())
A=[int(e)for e in sys.stdin]
cnt = 0
G = [797161,265720,88573,29524,9841,3280,1093,364,121,40,13,4,1]
G = [v for v in G if v <= n]
for g in G:
    for i in range(g, n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j+g] = A[j]
            j = j - g
            cnt += 1
        A[j+g] = v
print(len(G))
print(*G)
print(cnt)
print(*A,sep='\n')


### FIXED CODE ###

import sys
def insertionSort(A, n, g):
    global cnt
    for i in range(g, n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j + g] = A[j]
            j = j - g
            cnt += 1
        A[j + g] = v
def solve():
    n = int(input())
    A = list(map(int, sys.stdin))
    G = [int((2.25**i - 1) / 1.25)for i in range(17, 0, -1)]
    G = [v for v in G if v <= n]
    for g in G:
        insertionSort(A, n, g)
    print(len(G))
    print(*G)
    print(cnt)
    print('\n'.join(map(str, A)))
if __name__ == '__main__':
    cnt = 0
    solve()
N = int(input())
A = list(map(int,input().split()))

MAX = 2*10**5+7
A.sort()

num_tmp = [0]*MAX

for a in A:
    if num_tmp[a] == 1:
        num_tmp[a] = 2
        continue
    tmp = a
    while tmp <= MAX:
        num_tmp[tmp] = 1
        tmp += a

ans = 0
for a in A:
    if num_tmp[a] == 1:
        ans += 1
        
print(ans)

### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort()
    MAX = A[-1]+1
    num_tmp = [0]*MAX

    for a in A:
        num_tmp[a] += 1
        if num_tmp[a] == 1:
            for i in range(2*a,MAX,a):
                num_tmp[i] = 2

    print(num_tmp.count(1))
    
main()
magialist=[]
datalist=[]
h,w=map(int,input().split())
for i in range(10):
    add=list(map(int,input().split()))
    magialist.append(add)
for j in range(h):
    add1=list(map(int,input().split()))
    datalist.extend(add1)
storelist=[[[]*10]*10]*10
    #わーシャルフロイド法
def warsyaru(i,j,k):
    if k==0:
            return min(magialist[i][j],magialist[i][0]+magialist[0][j])
            storelist[i][j][0].append(min(magialist[i][j],magialist[i][0]+magialist[0][j]))
            
    elif k>=1:
        return min(storelist[i][j][k-1],storelist[i][k][k-1]+storelist[k][j][k-1])
        storelist[i][j][k].append(storelist[i][j][k-1],storelist[i][k][k-1]+storelist[k][j][k-1])
uselist=[]
for j in range(10):
    uselist.append(warsyaru(j,1,9))
ans=0
for nums in range(h*w):
    
    for i in range(10):
        if datalist[nums]==-1:
            continue
        
        elif datalist[nums]==i:
            ans+=uselist[i]
print(ans)


### FIXED CODE ###

magialist=[]
datalist=[]
h,w=map(int,input().split())
for i in range(10):
    add=list(map(int,input().split()))
    magialist.append(add)

for j in range(h):
    add1=list(map(int,input().split()))
    datalist.extend(add1)
 
storelist=[[[[] for i in range(10)] for i in range(10)] for i in range(10)]
    #わーシャルフロイド法
for i in range(10):
    for j in range(10):
            a=min(magialist[i][j],magialist[i][0]+magialist[0][j])
            storelist[0][i][j]=a
k=1
while k<=9:
    for i in range(10):
        for j in range(10):
                a=min(storelist[k-1][i][j],storelist[k-1][i][k]+storelist[k-1][k][j])
                storelist[k][i][j]=a
    k+=1

uselist=[]
                                                                                        
for j in range(10):
    uselist.append(storelist[9][j][1])
ans=0
for nums in range(h*w):
        if datalist[nums]==-1:
            continue
        else:
            for j in range(10):
                if datalist[nums]==j:
                    ans+=uselist[j]
print(ans)
import sys
input = sys.stdin.readline

c = input()
print(chr(ord(c)+1))

### FIXED CODE ###

c = input()
ans = ord(c)+1
print(chr(ans))
s =0

print(n,a)

for f in range(n):
  
  for g in range(n):

    if g != f:
    	if a[f] == a[g]:
      		#print(a[f], a[g])
      		s = s+1
      
if s>0: print("NO")
else: print('YES')

### FIXED CODE ###

import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
#p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    pi = int(p[f])
    xs =(pi+1)/2
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]


MPs = {}
for a, b in ABs:
    # この書き方でa,bが取り出せる
    a = int(a)  # intに直すには先に直しておく
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1

for mp in range(1, N+1):
    if mp not in MPs:
        MPs[mp] = '0'

for _, y in sorted(MPs.items()):  # 使わない変数は_とする
    print(y)

### FIXED CODE ###

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

if A <= C and C <= B:
    print("Yes")
else:
    print('No')
s = list(input())
n = 0

for i in s:
  n += int(s)

print("Yes" if int(s)%n == 0 else "No")

### FIXED CODE ###

a = input()
s = list(a)
n = 0

for i in s:
  n += int(i)

print("Yes" if int(a)%n == 0 else "No")
a=int(input())
ans=1;
ok=True
for i in range(a):
    c=int(input())
    ans*=c
    if ans>10**18:
        ans=-1
        break
print(ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
INF=10**18
ans=1
a.sort()
for i in a:
    ans*=i
    if ans>INF:
        ans=-1
        break
print(ans)
a,b=map(int,input().split())
print['impossible','possible'][((a%3)+(b%3))%3==0]

### FIXED CODE ###

a,b=map(int,input().split());print(["Impossible","Possible"][a%3==0 or b%3==0 or (a+b)%3==0])
whatMan = []

N, K = input()
for i in range(1, K):
    wahtMan.append(input().split())
print(N - set(wahtMan).count)

### FIXED CODE ###

whatMan = []

N, K = input().split()
for i in range(int(K)):
    input()
    whatMan.extend(input().split())
print(int(N) - len(set(whatMan)))
def solve(a,dp,n):
  if n==0 or n==1:
    return 0
  if n==2:
    return abs(a[0]-a[1])
  if dp[n]>0:
    return dp[n]
  opt1 = abs(a[n]-a[n-1])+solve(a,dp,n-1)
  opt2 = abs(a[n]-a[n-2])+solve(a,dp,n-2)
  output = min(opt1,opt2)
  dp[n]=output
  return output

n = int(input())
a = list(map(int,input().split()))
dp = [0]*(n+1)
print(solve(a,dp,n-1))


 

### FIXED CODE ###

import sys

n = int(input())
a = list(map(int,input().split()))
dp = [sys.maxsize]*(n)
dp[0] = 0
for i in range(n-1):
  for j in (i+1,i+2):
    if j<n:
      dp[j] = min(dp[j],dp[i]+abs(a[i]-a[j]))

print(dp[n-1])
N = int(input())

ans = ""
while N > 0:
  x = (N-1) % 26

  ans = chr(ord('a') + x) + ans
  N = (N-1) // 26

print(ans)


### FIXED CODE ###

a = input()
print('A' if a.isupper() else 'a')
from collections import deque

N, K = map(int, input().split())
table = list(map(int, input().split()))
jnum = K - sum(1 for i in table if i >= 0)
q_plus = deque(sorted([i for i in table if i >= 0], reverse=True))
q_mins = deque(sorted([-i for i in table if i < 0], reverse=True))
s_plus = []
s_mins = []
total = 1


if jnum < 0 or jnum % 2 == 0:
    for i in range(K):
        if not q_plus:
            s_mins.append(q_mins.pop())
        elif not q_mins:
            s_plus.append(q_plus.pop())
        elif q_plus[0] > q_mins[0]:
            s_plus.append(q_plus.pop())
        else:
            s_mins.append(q_mins.pop())
    if len(s_mins) % 2 == 1:
        if not q_plus:
            s_plus[-1] = q_mins[0]
        elif not q_mins:
            s_mins[-1] = q_plus[0]
        elif q_mins[0] * s_mins[-1] > q_plus[0] * s_plus[-1]:
            s_plus[-1] = q_mins[0]
        else:
            s_mins[-1] = q_plus[0]
    s_plus.extend(s_mins)
    for j in s_plus:
        total = total * j % (10 ** 9 + 7)

else:
    for i in range(K):
        if not q_plus:
            total = total * q_mins.pop() * -1 % (10 ** 9 + 7)
        elif not q_mins:
            total = total * q_plus.pop() * -1 % (10 ** 9 + 7)
        elif q_plus[-1] > q_mins[-1]:
            total = total * q_mins.pop() * -1 % (10 ** 9 + 7)
        else:
            total = total * q_plus.pop() * -1 % (10 ** 9 + 7)

print(total)

### FIXED CODE ###

from collections import deque

N, K = map(int, input().split())
table = list(map(int, input().split()))
jnum = K - sum(1 for i in table if i >= 0)
num_mins = sum(1 for i in table if i < 0)
q_plus = deque(sorted([i for i in table if i >= 0], reverse=True))
q_mins = deque(sorted([-i for i in table if i < 0], reverse=True))
s_plus = []
s_mins = []
total = 1


# if jnum < 0 or jnum % 2 == 0:
if (K % 2 == 1 and N == num_mins) or (N == K and num_mins % 2 == 1):
    for i in range(K):
        if not q_plus:
            total = -total * q_mins.pop() % (10 ** 9 + 7)
        elif not q_mins:
            total = total * q_plus.pop() % (10 ** 9 + 7)
        elif q_plus[-1] > q_mins[-1]:
            total = -total * q_mins.pop() % (10 ** 9 + 7)
        else:
            total = total * q_plus.pop() % (10 ** 9 + 7)
    total = total % (10 ** 9 + 7)
else:
    for i in range(K):
        if not q_plus:
            s_mins.append(q_mins.popleft())
        elif not q_mins:
            s_plus.append(q_plus.popleft())
        elif q_plus[0] > q_mins[0]:
            s_plus.append(q_plus.popleft())
        else:
            s_mins.append(q_mins.popleft())
    if len(s_mins) % 2 == 1:
        if not q_plus:
            s_plus[-1] = q_mins[0]
        elif not q_mins or not s_plus:
            s_mins[-1] = q_plus[0]
        elif q_mins[0] * s_mins[-1] > q_plus[0] * s_plus[-1]:
            s_plus[-1] = q_mins[0]
        else:
            s_mins[-1] = q_plus[0]
    s_plus.extend(s_mins)
    for j in s_plus:
        total = total * j % (10 ** 9 + 7)


print(total)
def main():
    n,k = map(int,input().split())
    a = list(sorted(map(int,input().split())))
    mi = 0
    MA = a[n-1]
    if(k == 0):
        print(MA)
        return
    if(n == 1):
        print(MA//k)
        return
    while(True):
        m = mi + (MA - mi)//2
        #print(mi,m,MA)
        count = 0
        for i in a:
            count += i//m
        if(MA < mi):
            print(mi)
            break
        if(k < count):
            mi = m+1
        else:
            MA = m-1
        




if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n,k = map(int,input().split())
    a = list(sorted(map(int,input().split())))
    mi = 0
    MA = a[n-1]
    if(k == 0):
        print(MA)
        return
    while(True):
        m = mi + (MA - mi)//2
        if(MA == 1):
            print(1)
            return
        count = 0
        for i in a:
            plus = i//m - 1 if i%m == 0 else i//m 
            count += plus
        if(MA - mi <= 0):
            if(k >= count):
                print(m)
            else:
                print(mi)
            break
        if(k < count):
            mi = m+1
        else:
            MA = m
        





if __name__ == "__main__":
    main()
n=map(ijnt,input().split())
k=int(input())
n.sort(reverse=True)
print(n[0]*(2**k)+n[1]+n[2])


### FIXED CODE ###

n=list(map(int,input().split()))
k=int(input())
n.sort(reverse=True)
print(n[0]*(2**k)+n[1]+n[2])
N,K = map(int,input().split())
listn = list(str(N))
a = []
if len(str(N)) < K:
    for i in range(len(str(N))):
        if listn[i] != str(1):
            a.append(str(listn[i]))
else:
    for i in range(K):
        if listn[i] != str(1):
            a.append(str(listn[i]))
if a == []:
    print(1)
else:
    print(a[0])


### FIXED CODE ###

N, K = [int(input()) for _ in range(2)]
listn = list(str(N))
a = []
if len(str(N)) < K:
    for i in range(len(str(N))):
        if listn[i] != str(1):
            a.append(str(listn[i]))
else:
    for i in range(K):
        if listn[i] != str(1):
            a.append(str(listn[i]))
if a == []:
    print(1)
else:
    print(a[0])
#!/usr/bin
# -*- coding="utf-8" -*-

a = raw_input()
print ("ABC" + a )



### FIXED CODE ###

#!/usr/bin
# -*- coding="utf-8" -*-
 
a = input()
print ("ABC" + a )
words = input()

if len(words)%2 == 0:
    slice_cnt = len(words)//2
    words_cut = [words[:slice_cnt], words[slice_cnt:][::-1]]
    
    set_list = [*map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)])]
    print(set_list.count(2))
    
else:
    slice_cnt = (len(words) -1)//2
    words_cut = [words[:slice_cnt], words[slice_cnt+1:][::-1]]
    
    set_list = [*map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)])]
    print(set_list.count(2))

### FIXED CODE ###

words = input()

if len(words)%2 == 0:
    slice_cnt = len(words)//2
    words_cut = [words[:slice_cnt], words[slice_cnt:][::-1]]
    
    set_list = list(map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)]))
    print(set_list.count(2))
    
else:
    slice_cnt = (len(words) -1)//2
    words_cut = [words[:slice_cnt], words[slice_cnt+1:][::-1]]
    
    set_list = list(map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)]))
    print(set_list.count(2))