#E - Logs
import math
# 入力
N,K = map(int,input().split())
A   = list(map(int,input().split()))
Amax = int(max(A))
high = Amax
Cancut = Amax
low  = 0
while ( (high - low) > 0.01 ) :
    Cut = 0
    X = (high + low) / 2.0
    for i in range(N):
        Cut = Cut + math.ceil(A[i]/X) - 1
    if Cut <= K:
        high = X
        Cancut = X
    else:
        low  = X
# 出力
if (math.floor(high) != math.floor(low)):
    Cancut = math.floor( 100 * Cancut) /100.0
print(math.ceil(Cancut)) import math math N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K A   = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split Amax = int(max(A)) Amax int(max(A)) int max(A) max A high = Amax high Amax Cancut = Amax Cancut Amax low  = 0 low 0 while ( (high - low) > 0.01 ) :
    Cut = 0
    X = (high + low) / 2.0
    for i in range(N):
        Cut = Cut + math.ceil(A[i]/X) - 1
    if Cut <= K:
        high = X
        Cancut = X
    else:
        low  = X
# 出力 (high - low) > 0.01 high - low high low 0.01 Cut = 0 Cut 0 X = (high + low) / 2.0 X (high + low) / 2.0 high + low high low 2.0 for i in range(N):
        Cut = Cut + math.ceil(A[i]/X) - 1
     i range(N) range N Cut = Cut + math.ceil(A[i]/X) - 1 Cut Cut + math.ceil(A[i]/X) - 1 Cut + math.ceil(A[i]/X) Cut math.ceil(A[i]/X) math.ceil math ceil A[i]/X A[i] A i X 1 if Cut <= K:
        high = X
        Cancut = X
    else:
        low  = X
# 出力 Cut <= K Cut K high = X high X Cancut = X Cancut X low  = X low X if (math.floor(high) != math.floor(low)):
    Cancut = math.floor( 100 * Cancut) /100.0 math.floor(high) != math.floor(low) math.floor(high) math.floor math floor high math.floor(low) math.floor math floor low Cancut = math.floor( 100 * Cancut) /100.0 Cancut math.floor( 100 * Cancut) /100.0 math.floor( 100 * Cancut) math.floor math floor 100 * Cancut 100 Cancut 100.0 print(math.ceil(Cancut)) print math.ceil(Cancut) math.ceil math ceil Cancut high = X X high Cancut = X X Cancut N,K = map(int,input().split()) map(int,input().split()) N K = map(int,input().split()) map(int,input().split()) K high = Amax Amax high Cancut = math.floor( 100 * Cancut) /100.0 math.floor( 100 * Cancut) /100.0 Cancut Cancut = Amax Amax Cancut Cut = Cut + math.ceil(A[i]/X) - 1 Cut + math.ceil(A[i]/X) - 1 Cut low  = 0 0 low Amax = int(max(A)) int(max(A)) Amax Cut = 0 0 Cut A   = list(map(int,input().split())) list(map(int,input().split())) A low  = X X low X = (high + low) / 2.0 (high + low) / 2.0 X
#E - Logs
import math
# 入力
N,K = map(int,input().split())
A   = list(map(int,input().split()))
Amax = int(max(A))
high = Amax
Cancut = Amax
low  = 0
while ( (high - low) > 0.01 ) :
    Cut = 0
    X = (high + low) / 2.0
    for i in range(N):
        Cut = Cut + math.ceil(A[i]/X) - 1
    if Cut <= K:
        high = X
        Cancut = X
    else:
        low  = X
# 出力
if (math.floor(high) != math.floor(low)):
    Cancut = math.floor( 100 * Cancut) /100.0
print(math.ceil(Cancut))