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

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

s = sum(a)

x = [0]*n

y = 0

r = 0

for i in range(n):

    y = int(a[i]/s*k)

    x[i] = [i, y, a[i]/(y+1), a[i]]

    r += y

x.sort(key= lambda val : val[2],reverse=True)

for i in range(k-r):

    x[i][1] += 1

ans = 0

for i in range(n):

    ans = max(ans, x[i][3]/(x[i][1]+1))

print((int(-(-ans//1))))

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

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

s = sum(a)

x = [0]*n

t = 0

for i in range(n):

    y = int(a[i]/s * k)

    x[i] = [i, a[i], y, a[i]/(y+1)]

    t += y

x.sort(key= lambda val : val[3],reverse=True)

for i in range(k-t):

    x[i][2] += 1

ans = 0

for i in range(n):

    ans = max(ans, x[i][1]/(x[i][2]+1))

print((int(-(-ans//1))))
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
s = sum(a)
x = [0] * n
y = 0
r = 0
for i in range(n):
    y = int(a[i] / s * k)
    x[i] = [i, y, a[i] / (y + 1), a[i]]
    r += y
x.sort(key=lambda val: val[2], reverse=True)
for i in range(k - r):
    x[i][1] += 1
ans = 0
for i in range(n):
    ans = max(ans, x[i][3] / (x[i][1] + 1))
print((int(-(-ans // 1))))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
s = sum(a)
x = [0] * n
t = 0
for i in range(n):
    y = int(a[i] / s * k)
    x[i] = [i, a[i], y, a[i] / (y + 1)]
    t += y
x.sort(key=lambda val: val[3], reverse=True)
for i in range(k - t):
    x[i][2] += 1
ans = 0
for i in range(n):
    ans = max(ans, x[i][1] / (x[i][2] + 1))
print((int(-(-ans // 1))))

-y = 0 -r = 0 +t = 0 -    x[i] = [i, y, a[i] / (y + 1), a[i]] -    r += y -x.sort(key=lambda val: val[2], reverse=True) -for i in range(k - r): -    x[i][1] += 1 +    x[i] = [i, a[i], y, a[i] / (y + 1)] +    t += y +x.sort(key=lambda val: val[3], reverse=True) +for i in range(k - t): +    x[i][2] += 1 -    ans = max(ans, x[i][3] / (x[i][1] + 1)) +    ans = max(ans, x[i][1] / (x[i][2] + 1))