import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
start = 0
end = max(A)
ans = abs(end + start) // 2 + 1
while abs(start - end) > 1:
    ans = abs(end + start) // 2
    cnt = 0
    for i in range(N):
        cnt += math.floor(A[i]/ans - 0.0000000001)
        if cnt > K: #ダメだったら
            start = ans
            break
    else: #オッケーだったら
        end = ans
        continue

cnt = 0
for i in range(N):
    cnt += math.floor((A[i] / ans) - 0.000000000001)

if cnt > K:  # ダメだったら
    print(ans + 1)
else:  # オッケーだったら
    print(ans) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split start = 0 start 0 end = max(A) end max(A) max A ans = abs(end + start) // 2 + 1 ans abs(end + start) // 2 + 1 abs(end + start) // 2 abs(end + start) abs end + start end start 2 1 while abs(start - end) > 1:
    ans = abs(end + start) // 2
    cnt = 0
    for i in range(N):
        cnt += math.floor(A[i]/ans - 0.0000000001)
        if cnt > K: #ダメだったら
            start = ans
            break
    else: #オッケーだったら
        end = ans
        continue abs(start - end) > 1 abs(start - end) abs start - end start end 1 ans = abs(end + start) // 2 ans abs(end + start) // 2 abs(end + start) abs end + start end start 2 cnt = 0 cnt 0 for i in range(N):
        cnt += math.floor(A[i]/ans - 0.0000000001)
        if cnt > K: #ダメだったら
            start = ans
            break
    else: #オッケーだったら
        end = ans
        continue i range(N) range N cnt += math.floor(A[i]/ans - 0.0000000001) cnt math.floor(A[i]/ans - 0.0000000001) math.floor math floor A[i]/ans - 0.0000000001 A[i]/ans A[i] A i ans 0.0000000001 if cnt > K: #ダメだったら
            start = ans
            break
     cnt > K cnt K start = ans start ans break end = ans end ans continue cnt = 0 cnt 0 for i in range(N):
    cnt += math.floor((A[i] / ans) - 0.000000000001) i range(N) range N cnt += math.floor((A[i] / ans) - 0.000000000001) cnt math.floor((A[i] / ans) - 0.000000000001) math.floor math floor (A[i] / ans) - 0.000000000001 A[i] / ans A[i] A i ans 0.000000000001 if cnt > K:  # ダメだったら
    print(ans + 1)
else:  # オッケーだったら
    print(ans) cnt > K cnt K print(ans + 1) print ans + 1 ans 1 print(ans) print ans start = 0 0 start cnt += math.floor((A[i] / ans) - 0.000000000001) math.floor((A[i] / ans) - 0.000000000001) cnt cnt = 0 0 cnt cnt += math.floor(A[i]/ans - 0.0000000001) math.floor(A[i]/ans - 0.0000000001) cnt A = list(map(int, input().split())) list(map(int, input().split())) A N, K = map(int, input().split()) map(int, input().split()) N ans = abs(end + start) // 2 abs(end + start) // 2 ans start = ans ans start ans = abs(end + start) // 2 + 1 abs(end + start) // 2 + 1 ans end = max(A) max(A) end K = map(int, input().split()) map(int, input().split()) K end = ans ans end cnt = 0 0 cnt
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
start = 0
end = max(A)
ans = abs(end + start) // 2 + 1
while abs(start - end) > 1:
    ans = abs(end + start) // 2
    cnt = 0
    for i in range(N):
        cnt += math.floor(A[i]/ans - 0.0000000001)
        if cnt > K: #ダメだったら
            start = ans
            break
    else: #オッケーだったら
        end = ans
        continue

cnt = 0
for i in range(N):
    cnt += math.floor((A[i] / ans) - 0.000000000001)

if cnt > K:  # ダメだったら
    print(ans + 1)
else:  # オッケーだったら
    print(ans)
