n,k = map(int, input().split())
l = list(map(int,input().split()))
ok = max(l)
ng = 0

def solver(x):
    cnt = 0
    for logs in l:
        if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
    if cnt <= k:
        return True
    else:
        return False

while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if solver(mid) == True:
        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 l = list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ok = max(l) ok max(l) max l ng = 0 ng 0 def solver(x):
    cnt = 0
    for logs in l:
        if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
    if cnt <= k:
        return True
    else:
        return False solver cnt = 0 cnt 0 for logs in l:
        if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
     logs l if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
     logs % x == 0 logs % x logs x 0 cnt += (logs // x) -1 cnt (logs // x) -1 logs // x logs x 1 cnt += logs// x cnt logs// x logs x if cnt <= k:
        return True
    else:
        return False cnt <= k cnt k return True True return False False x x while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if solver(mid) == True:
        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 if solver(mid) == True:
        ok = mid
    else:
        ng = mid solver(mid) == True solver(mid) solver mid True ok = mid ok mid ng = mid ng mid print(ok) print ok n,k = map(int, input().split()) map(int, input().split()) n ok = max(l) max(l) ok ng = mid mid ng ok = mid mid ok def solver(x):
    cnt = 0
    for logs in l:
        if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
    if cnt <= k:
        return True
    else:
        return False def solver(x):
    cnt = 0
    for logs in l:
        if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
    if cnt <= k:
        return True
    else:
        return False solver l = list(map(int,input().split())) list(map(int,input().split())) l mid = (ok+ng)//2 (ok+ng)//2 mid k = map(int, input().split()) map(int, input().split()) k ng = 0 0 ng
n,k = map(int, input().split())
l = list(map(int,input().split()))
ok = max(l)
ng = 0

def solver(x):
    cnt = 0
    for logs in l:
        if logs % x == 0:
            cnt += (logs // x) -1
        else:
            cnt += logs// x
    if cnt <= k:
        return True
    else:
        return False

while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if solver(mid) == True:
        ok = mid
    else:
        ng = mid

print(ok)
