from math import ceil
N, K = map(int,input().split())
A = list(map(int,input().split()))
def chk(L):
    cnt = 0
    for i in range(N):
        cnt += ceil(A[i]/L)-1
    return cnt <= K
l, r = 1, max(A)
while l <= r:
    m = (l+r)//2
    if chk(m):
        r = m-1
    else:
        l = m+1
print(min([x for x in [m-1,m,m+1] if x > 0 and chk(x)])) 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 def chk(L):
    cnt = 0
    for i in range(N):
        cnt += ceil(A[i]/L)-1
    return cnt <= K chk cnt = 0 cnt 0 for i in range(N):
        cnt += ceil(A[i]/L)-1
     i range(N) range N cnt += ceil(A[i]/L)-1 cnt ceil(A[i]/L)-1 ceil(A[i]/L) ceil A[i]/L A[i] A i L 1 return cnt <= K cnt <= K cnt K L L l, r = 1, max(A) l 1 r max(A) max A while l <= r:
    m = (l+r)//2
    if chk(m):
        r = m-1
    else:
        l = m+1 l <= r l r m = (l+r)//2 m (l+r)//2 l+r l r 2 if chk(m):
        r = m-1
    else:
        l = m+1 chk(m) chk m r = m-1 r m-1 m 1 l = m+1 l m+1 m 1 x for x in [m-1,m,m+1] if x > 0 and chk(x) for x in [m-1,m,m+1] if x > 0 and chk(x) x [m-1,m,m+1] m-1 m 1 m m+1 m 1 x > 0 and chk(x) x > 0 x 0 chk(x) chk x if x > 0 and chk(x) x print(min([x for x in [m-1,m,m+1] if x > 0 and chk(x)])) print min([x for x in [m-1,m,m+1] if x > 0 and chk(x)]) min [x for x in [m-1,m,m+1] if x > 0 and chk(x)] A = list(map(int,input().split())) list(map(int,input().split())) A r = 1, max(A) max(A) r l, r = 1, max(A) 1 l m = (l+r)//2 (l+r)//2 m N, K = map(int,input().split()) map(int,input().split()) N r = m-1 m-1 r def chk(L):
    cnt = 0
    for i in range(N):
        cnt += ceil(A[i]/L)-1
    return cnt <= K def chk(L):
    cnt = 0
    for i in range(N):
        cnt += ceil(A[i]/L)-1
    return cnt <= K chk l = m+1 m+1 l K = map(int,input().split()) map(int,input().split()) K
from math import ceil
N, K = map(int,input().split())
A = list(map(int,input().split()))
def chk(L):
    cnt = 0
    for i in range(N):
        cnt += ceil(A[i]/L)-1
    return cnt <= K
l, r = 1, max(A)
while l <= r:
    m = (l+r)//2
    if chk(m):
        r = m-1
    else:
        l = m+1
print(min([x for x in [m-1,m,m+1] if x > 0 and chk(x)]))