from math import ceil
N,K =map(int,input().split())
A = list(map(int,input().split()))
X1 = 1
X2 = 10**9
while X1 != X2-1:
    X = ceil((X1 + X2)/2)
    S = 0
    for i in range(N):
        S += ceil(A[i]/X) - 1
    if S <= K:
        X2 = X
    else:
        X1 = X
S1 = 0
for i in range(N):
    S += ceil(A[i]/X2) - 1
if S <= K:
    X2 = X1
print(X2) from math import ceil 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 X1 = 1 X1 1 X2 = 10**9 X2 10**9 10 9 while X1 != X2-1:
    X = ceil((X1 + X2)/2)
    S = 0
    for i in range(N):
        S += ceil(A[i]/X) - 1
    if S <= K:
        X2 = X
    else:
        X1 = X X1 != X2-1 X1 X2-1 X2 1 X = ceil((X1 + X2)/2) X ceil((X1 + X2)/2) ceil (X1 + X2)/2 X1 + X2 X1 X2 2 S = 0 S 0 for i in range(N):
        S += ceil(A[i]/X) - 1
     i range(N) range N S += ceil(A[i]/X) - 1 S ceil(A[i]/X) - 1 ceil(A[i]/X) ceil A[i]/X A[i] A i X 1 if S <= K:
        X2 = X
    else:
        X1 = X S <= K S K X2 = X X2 X X1 = X X1 X S1 = 0 S1 0 for i in range(N):
    S += ceil(A[i]/X2) - 1 i range(N) range N S += ceil(A[i]/X2) - 1 S ceil(A[i]/X2) - 1 ceil(A[i]/X2) ceil A[i]/X2 A[i] A i X2 1 if S <= K:
    X2 = X1 S <= K S K X2 = X1 X2 X1 print(X2) print X2 N,K =map(int,input().split()) map(int,input().split()) N X2 = X1 X1 X2 S += ceil(A[i]/X) - 1 ceil(A[i]/X) - 1 S S += ceil(A[i]/X2) - 1 ceil(A[i]/X2) - 1 S S1 = 0 0 S1 X2 = 10**9 10**9 X2 X1 = X X X1 A = list(map(int,input().split())) list(map(int,input().split())) A K =map(int,input().split()) map(int,input().split()) K S = 0 0 S X1 = 1 1 X1 X2 = X X X2 X = ceil((X1 + X2)/2) ceil((X1 + X2)/2) X
from math import ceil
N,K =map(int,input().split())
A = list(map(int,input().split()))
X1 = 1
X2 = 10**9
while X1 != X2-1:
    X = ceil((X1 + X2)/2)
    S = 0
    for i in range(N):
        S += ceil(A[i]/X) - 1
    if S <= K:
        X2 = X
    else:
        X1 = X
S1 = 0
for i in range(N):
    S += ceil(A[i]/X2) - 1
if S <= K:
    X2 = X1
print(X2)