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


def is_ok(l):
    cnt = 0
    for L in a:
        cnt += L // l - 1
        if L % l != 0:
            cnt += 1
    return cnt <= k


def meguru_bisect(ng, ok):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok


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


def is_ok(l):
    cnt = 0
    for L in a:
        cnt += L // l - 1
        if L % l != 0:
            cnt += 1
    return cnt <= k


def meguru_bisect(ng, ok):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok


print(meguru_bisect(0, max(a)))