n, k, *a = map(int, open(0).read().split())


def c(x):
    res = 0
    for b in a:
        # bを最大がxになるように、できるだけ少ない回数で
        # だいたいb/x等分？
        res += 0 - - b // x - 1
    return res <= k


ng = 0
ok = 10 ** 10
while ok - ng > 1:
    mid = (ok + ng) >> 1
    if c(mid):
        ok = mid
    else:
        ng = mid
print(ok) 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 def c(x):
    res = 0
    for b in a:
        # bを最大がxになるように、できるだけ少ない回数で
        # だいたいb/x等分？
        res += 0 - - b // x - 1
    return res <= k c res = 0 res 0 for b in a:
        # bを最大がxになるように、できるだけ少ない回数で
        # だいたいb/x等分？
        res += 0 - - b // x - 1
     b a res += 0 - - b // x - 1 res 0 - - b // x - 1 0 - - b // x 0 - b // x - b b x 1 return res <= k res <= k res k x x ng = 0 ng 0 ok = 10 ** 10 ok 10 ** 10 10 10 while ok - ng > 1:
    mid = (ok + ng) >> 1
    if c(mid):
        ok = mid
    else:
        ng = mid ok - ng > 1 ok - ng ok ng 1 mid = (ok + ng) >> 1 mid (ok + ng) >> 1 ok + ng ok ng 1 if c(mid):
        ok = mid
    else:
        ng = mid c(mid) c mid ok = mid ok mid ng = mid ng mid print(ok) print ok ng = mid mid ng def c(x):
    res = 0
    for b in a:
        # bを最大がxになるように、できるだけ少ない回数で
        # だいたいb/x等分？
        res += 0 - - b // x - 1
    return res <= k def c(x):
    res = 0
    for b in a:
        # bを最大がxになるように、できるだけ少ない回数で
        # だいたいb/x等分？
        res += 0 - - b // x - 1
    return res <= k c ng = 0 0 ng ok = mid mid ok k, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) k ok = 10 ** 10 10 ** 10 ok n, k, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n mid = (ok + ng) >> 1 (ok + ng) >> 1 mid
n, k, *a = map(int, open(0).read().split())


def c(x):
    res = 0
    for b in a:
        # bを最大がxになるように、できるだけ少ない回数で
        # だいたいb/x等分？
        res += 0 - - b // x - 1
    return res <= k


ng = 0
ok = 10 ** 10
while ok - ng > 1:
    mid = (ok + ng) >> 1
    if c(mid):
        ok = mid
    else:
        ng = mid
print(ok)
