# ng, ok = 0, 10**9+1

n,k = map(int, input().split())
al = list(map(int, input().split()))
ng, ok = 0, 10**9+1
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    ok_flag = True
    # ...
    cnt = 0
    for a in al:
        cnt += (a-1)//mid
    
    if cnt <= k:
        ok = mid
    else:
    	ng = mid
print(ok)
 n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k al = list(map(int, input().split())) al list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ng, ok = 0, 10**9+1 ng 0 ok 10**9+1 10**9 10 9 1 while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    ok_flag = True
    # ...
    cnt = 0
    for a in al:
        cnt += (a-1)//mid
    
    if cnt <= k:
        ok = mid
    else:
    	ng = mid abs(ok-ng) > 1 abs(ok-ng) abs ok-ng ok ng 1 mid = (ok+ng)//2 mid (ok+ng)//2 ok+ng ok ng 2 ok_flag = True ok_flag True cnt = 0 cnt 0 for a in al:
        cnt += (a-1)//mid
    
     a al cnt += (a-1)//mid cnt (a-1)//mid a-1 a 1 mid if cnt <= k:
        ok = mid
    else:
    	ng = mid cnt <= k cnt k ok = mid ok mid ng = mid ng mid print(ok) print ok cnt = 0 0 cnt ok = mid mid ok n,k = map(int, input().split()) map(int, input().split()) n ok = 0, 10**9+1 10**9+1 ok al = list(map(int, input().split())) list(map(int, input().split())) al ng, ok = 0, 10**9+1 0 ng ok_flag = True True ok_flag mid = (ok+ng)//2 (ok+ng)//2 mid k = map(int, input().split()) map(int, input().split()) k ng = mid mid ng cnt += (a-1)//mid (a-1)//mid cnt
# ng, ok = 0, 10**9+1

n,k = map(int, input().split())
al = list(map(int, input().split()))
ng, ok = 0, 10**9+1
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    ok_flag = True
    # ...
    cnt = 0
    for a in al:
        cnt += (a-1)//mid
    
    if cnt <= k:
        ok = mid
    else:
    	ng = mid
print(ok)

