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

n, k, *a = map(int, open(0).read().split())
print(meg_bisect(0, max(a), lambda x: sum(0--b // x - 1 for b in a) <= k)) def meg_bisect(ng, ok, func):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if func(mid):
            ok = mid
        else:
            ng = mid
    return ok meg_bisect while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if func(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 func(mid):
            ok = mid
        else:
            ng = mid
     func(mid) func mid ok = mid ok mid ng = mid ng mid return ok ok ng ng ok ok func func n, k, *a = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split k *a a print(meg_bisect(0, max(a), lambda x: sum(0--b // x - 1 for b in a) <= k)) print meg_bisect(0, max(a), lambda x: sum(0--b // x - 1 for b in a) <= k) meg_bisect 0 max(a) max a lambda x: sum(0--b // x - 1 for b in a) <= k sum(0--b // x - 1 for b in a) <= k sum(0--b // x - 1 for b in a) sum 0--b // x - 1 0--b // x 0 -b // x -b b x 1 k x k, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) k def meg_bisect(ng, ok, func):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if func(mid):
            ok = mid
        else:
            ng = mid
    return ok def meg_bisect(ng, ok, func):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if func(mid):
            ok = mid
        else:
            ng = mid
    return ok meg_bisect n, k, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n
def meg_bisect(ng, ok, func):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if func(mid):
            ok = mid
        else:
            ng = mid
    return ok

n, k, *a = map(int, open(0).read().split())
print(meg_bisect(0, max(a), lambda x: sum(0--b // x - 1 for b in a) <= k))