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

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



l = 0

r = 10**9 + 1

ref = 0

ans = 10**9



while r - l > 1:

    now = (l + r)//2

    for i in a:

        ref += 0 - -i//now - 1

        if ref > k:

            ref = 0

            l = now

            break

    else:

        ans = now

        ref = 0

        r = now

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

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



l = 0

r = 10**9 + 1

ref = 0

ans = 10**9



while r - l > 1:

    now = (l + r)//2

    for i in a:

        ref += 0 - -i//now - 1

    if ref <= k:

        ans = now

        ref = 0

        r = now

    else:

        ref = 0

        l = now

print(ans)
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
l = 0
r = 10**9 + 1
ref = 0
ans = 10**9
while r - l > 1:
    now = (l + r) // 2
    for i in a:
        ref += 0 - -i // now - 1
        if ref > k:
            ref = 0
            l = now
            break
    else:
        ans = now
        ref = 0
        r = now
print(ans)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
l = 0
r = 10**9 + 1
ref = 0
ans = 10**9
while r - l > 1:
    now = (l + r) // 2
    for i in a:
        ref += 0 - -i // now - 1
    if ref <= k:
        ans = now
        ref = 0
        r = now
    else:
        ref = 0
        l = now
print(ans)

-        if ref > k: -            ref = 0 -            l = now -            break -    else: +    if ref <= k: +    else: +        ref = 0 +        l = now