def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

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

    print(ok)


solve() def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

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

    print(ok) solve n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = list(map(int, input().split())) s list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

     is_ok res = 0 res 0 for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
         ss s y = ss // x y ss // x ss x if ss % x == 0:
                y -= 1
             ss % x == 0 ss % x ss x 0 y -= 1 y 1 res += y res y return res res x x ng = 0 ng 0 ok = 10 ** 10 ok 10 ** 10 10 10 while ok - ng > 1:
        mid = (ok + ng) // 2
        if is_ok(mid) <= k:
            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) <= k:
            ok = mid
        else:
            ng = mid

     is_ok(mid) <= k is_ok(mid) is_ok mid k ok = mid ok mid ng = mid ng mid print(ok) print ok solve() solve def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

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

    print(ok) def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

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

    print(ok) solve
def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

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

    print(ok)


solve()
