N, K = list(map(int, input().split()))

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



l = 0

r = max(A)

for _ in range(30):

    mid = (r + l + 1) // 2

    count = 0

    for log in A:

        if log > mid:

            count += (log + mid - 1) // mid - 1

    if count <= K:

        r = mid

    else:

        l = mid



print(r)

N, K = list(map(int, input().split()))

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



l = 1

r = max(A)

while l != r:

    mid = (r + l) // 2

    count = 0

    for log in A:

        count += (log - 1) // mid

    if count <= K:

        r = mid

    else:

        l = mid + 1



print(r)

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
l = 0
r = max(A)
for _ in range(30):
    mid = (r + l + 1) // 2
    count = 0
    for log in A:
        if log > mid:
            count += (log + mid - 1) // mid - 1
    if count <= K:
        r = mid
    else:
        l = mid
print(r)

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
l = 1
r = max(A)
while l != r:
    mid = (r + l) // 2
    count = 0
    for log in A:
        count += (log - 1) // mid
    if count <= K:
        r = mid
    else:
        l = mid + 1
print(r)

-l = 0 +l = 1 -for _ in range(30): -    mid = (r + l + 1) // 2 +while l != r: +    mid = (r + l) // 2 -        if log > mid: -            count += (log + mid - 1) // mid - 1 +        count += (log - 1) // mid -        l = mid +        l = mid + 1