import math
N, K = map(int, input().split())
A = [int(x) for x in input().split()]

left, right = 0, max(A)
while right - left > 1:
    mid = (left + right) // 2
    res = 0
    for i in range(N):
        res = res + math.ceil(A[i]/mid) - 1
    if res <= K:
        right = mid
    else:
        left = mid
print(right) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A = [int(x) for x in input().split()] A [int(x) for x in input().split()] left, right = 0, max(A) left 0 right max(A) max A while right - left > 1:
    mid = (left + right) // 2
    res = 0
    for i in range(N):
        res = res + math.ceil(A[i]/mid) - 1
    if res <= K:
        right = mid
    else:
        left = mid right - left > 1 right - left right left 1 mid = (left + right) // 2 mid (left + right) // 2 left + right left right 2 res = 0 res 0 for i in range(N):
        res = res + math.ceil(A[i]/mid) - 1
     i range(N) range N res = res + math.ceil(A[i]/mid) - 1 res res + math.ceil(A[i]/mid) - 1 res + math.ceil(A[i]/mid) res math.ceil(A[i]/mid) math.ceil math ceil A[i]/mid A[i] A i mid 1 if res <= K:
        right = mid
    else:
        left = mid res <= K res K right = mid right mid left = mid left mid print(right) print right right = 0, max(A) max(A) right K = map(int, input().split()) map(int, input().split()) K A = [int(x) for x in input().split()] [int(x) for x in input().split()] A mid = (left + right) // 2 (left + right) // 2 mid left, right = 0, max(A) 0 left left = mid mid left res = 0 0 res N, K = map(int, input().split()) map(int, input().split()) N res = res + math.ceil(A[i]/mid) - 1 res + math.ceil(A[i]/mid) - 1 res right = mid mid right
import math
N, K = map(int, input().split())
A = [int(x) for x in input().split()]

left, right = 0, max(A)
while right - left > 1:
    mid = (left + right) // 2
    res = 0
    for i in range(N):
        res = res + math.ceil(A[i]/mid) - 1
    if res <= K:
        right = mid
    else:
        left = mid
print(right)