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

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

max_a = 10**9

min_a = 0



while max_a-min_a>1:

    count = K

    mean_a = (max_a+min_a)//2

    

    for i in range(N):

        if a[i]<=mean_a: continue

        count -= a[i]//mean_a

    if count >= 0:

        max_a = mean_a

    else:

        min_a = mean_a



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

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

max_a = 10**9

min_a = 0



while max_a-min_a>1:

    count = K

    mean_a = (max_a+min_a)//2

    for i in range(N):

        count -= -(-a[i]//mean_a)-1

    if count >= 0:

        max_a = mean_a

    else:

        min_a = mean_a



print(max_a)
N, K = list(map(int, input().split()))
a = list(map(int, input().split()))
max_a = 10**9
min_a = 0
while max_a - min_a > 1:
    count = K
    mean_a = (max_a + min_a) // 2
    for i in range(N):
        if a[i] <= mean_a:
            continue
        count -= a[i] // mean_a
    if count >= 0:
        max_a = mean_a
    else:
        min_a = mean_a
print(max_a)

N, K = list(map(int, input().split()))
a = list(map(int, input().split()))
max_a = 10**9
min_a = 0
while max_a - min_a > 1:
    count = K
    mean_a = (max_a + min_a) // 2
    for i in range(N):
        count -= -(-a[i] // mean_a) - 1
    if count >= 0:
        max_a = mean_a
    else:
        min_a = mean_a
print(max_a)

-        if a[i] <= mean_a: -            continue -        count -= a[i] // mean_a +        count -= -(-a[i] // mean_a) - 1