N, K = map(int, input().split())
A = list(map(int, input().split()))

def is_ok(x):
    cnt = 0
    for a in A:
        cnt += a // x
        if a % x == 0:
            cnt -= 1
    return cnt <= K

ng = 0
ok = 10**9
while ok - ng > 1:
    mid = (ok + ng) // 2
    if is_ok(mid):
        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 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 is_ok(x):
    cnt = 0
    for a in A:
        cnt += a // x
        if a % x == 0:
            cnt -= 1
    return cnt <= K is_ok cnt = 0 cnt 0 for a in A:
        cnt += a // x
        if a % x == 0:
            cnt -= 1
     a A cnt += a // x cnt a // x a x if a % x == 0:
            cnt -= 1
     a % x == 0 a % x a x 0 cnt -= 1 cnt 1 return cnt <= K cnt <= K cnt K x x ng = 0 ng 0 ok = 10**9 ok 10**9 10 9 while ok - ng > 1:
    mid = (ok + ng) // 2
    if is_ok(mid):
        ok = mid
    else:
        ng = mid ok - ng > 1 ok - ng ok ng 1 mid = (ok + ng) // 2 mid (ok + ng) // 2 ok + ng ok ng 2 if is_ok(mid):
        ok = mid
    else:
        ng = mid is_ok(mid) is_ok mid ok = mid ok mid ng = mid ng mid print(ok) print ok K = map(int, input().split()) map(int, input().split()) K A = list(map(int, input().split())) list(map(int, input().split())) A mid = (ok + ng) // 2 (ok + ng) // 2 mid ok = 10**9 10**9 ok ng = 0 0 ng ng = mid mid ng ok = mid mid ok N, K = map(int, input().split()) map(int, input().split()) N def is_ok(x):
    cnt = 0
    for a in A:
        cnt += a // x
        if a % x == 0:
            cnt -= 1
    return cnt <= K def is_ok(x):
    cnt = 0
    for a in A:
        cnt += a // x
        if a % x == 0:
            cnt -= 1
    return cnt <= K is_ok
N, K = map(int, input().split())
A = list(map(int, input().split()))

def is_ok(x):
    cnt = 0
    for a in A:
        cnt += a // x
        if a % x == 0:
            cnt -= 1
    return cnt <= K

ng = 0
ok = 10**9
while ok - ng > 1:
    mid = (ok + ng) // 2
    if is_ok(mid):
        ok = mid
    else:
        ng = mid
print(ok)