n, k = map(int,input().split())
a = list(map(int,input().split()))
a.sort()

ok = a[-1]
ng = 0
while abs(ok - ng)>1:
    X = (ok + ng)//2
    
    cnt = 0
    for i in range(n):
        temp = a[-(i + 1)]
        if temp <= X:break
        temp_cnt = (temp + X - 1)//X - 1
        cnt += temp_cnt
    
    if cnt <= k:ok = X
    else:ng = X
    
print(ok) 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 a.sort() a.sort a sort ok = a[-1] ok a[-1] a -1 ng = 0 ng 0 while abs(ok - ng)>1:
    X = (ok + ng)//2
    
    cnt = 0
    for i in range(n):
        temp = a[-(i + 1)]
        if temp <= X:break
        temp_cnt = (temp + X - 1)//X - 1
        cnt += temp_cnt
    
    if cnt <= k:ok = X
    else:ng = X
     abs(ok - ng)>1 abs(ok - ng) abs ok - ng ok ng 1 X = (ok + ng)//2 X (ok + ng)//2 ok + ng ok ng 2 cnt = 0 cnt 0 for i in range(n):
        temp = a[-(i + 1)]
        if temp <= X:break
        temp_cnt = (temp + X - 1)//X - 1
        cnt += temp_cnt
    
     i range(n) range n temp = a[-(i + 1)] temp a[-(i + 1)] a -(i + 1) i + 1 i 1 if temp <= X:break
         temp <= X temp X temp_cnt = (temp + X - 1)//X - 1 temp_cnt (temp + X - 1)//X - 1 (temp + X - 1)//X temp + X - 1 temp + X temp X 1 X 1 cnt += temp_cnt cnt temp_cnt if cnt <= k:ok = X
    else:ng = X
     cnt <= k cnt k print(ok) print ok ng = 0 0 ng cnt = 0 0 cnt n, k = map(int,input().split()) map(int,input().split()) n temp = a[-(i + 1)] a[-(i + 1)] temp a = list(map(int,input().split())) list(map(int,input().split())) a k = map(int,input().split()) map(int,input().split()) k temp_cnt = (temp + X - 1)//X - 1 (temp + X - 1)//X - 1 temp_cnt cnt += temp_cnt temp_cnt cnt ok = a[-1] a[-1] ok X = (ok + ng)//2 (ok + ng)//2 X
n, k = map(int,input().split())
a = list(map(int,input().split()))
a.sort()

ok = a[-1]
ng = 0
while abs(ok - ng)>1:
    X = (ok + ng)//2
    
    cnt = 0
    for i in range(n):
        temp = a[-(i + 1)]
        if temp <= X:break
        temp_cnt = (temp + X - 1)//X - 1
        cnt += temp_cnt
    
    if cnt <= k:ok = X
    else:ng = X
    
print(ok)