n,k,*a=list(map(int,open(l:=0).read().split()))

r=10**9

while~l+r:

 x=l+r>>1

 if-sum(-b//x+1for b in a)>k:l=x

 else:r=x

print(r)
n,k,*a=list(map(int,open(0).read().split()))

l,r=0,10**9

while~l+r:

 x=l+r>>1

 if-sum(-b//x+1for b in a)>k:l=x

 else:r=x

print(r)
n, k, *a = list(map(int, open(l := 0).read().split()))
r = 10**9
while ~l + r:
    x = l + r >> 1
    if -sum(-b // x + 1 for b in a) > k:
        l = x
    else:
        r = x
print(r)

n, k, *a = list(map(int, open(0).read().split()))
l, r = 0, 10**9
while ~l + r:
    x = l + r >> 1
    if -sum(-b // x + 1 for b in a) > k:
        l = x
    else:
        r = x
print(r)

-n, k, *a = list(map(int, open(l := 0).read().split())) -r = 10**9 +n, k, *a = list(map(int, open(0).read().split())) +l, r = 0, 10**9