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

low = 1
high = max(A)

while low != high:
    mid = (low + high)// 2
    cnt = 0
    for i in A:
        cnt += math.ceil(i/mid) - 1
    if cnt > k :
        low = mid + 1
    else:
        high = mid

print(low) 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 low = 1 low 1 high = max(A) high max(A) max A while low != high:
    mid = (low + high)// 2
    cnt = 0
    for i in A:
        cnt += math.ceil(i/mid) - 1
    if cnt > k :
        low = mid + 1
    else:
        high = mid low != high low high mid = (low + high)// 2 mid (low + high)// 2 low + high low high 2 cnt = 0 cnt 0 for i in A:
        cnt += math.ceil(i/mid) - 1
     i A cnt += math.ceil(i/mid) - 1 cnt math.ceil(i/mid) - 1 math.ceil(i/mid) math.ceil math ceil i/mid i mid 1 if cnt > k :
        low = mid + 1
    else:
        high = mid cnt > k cnt k low = mid + 1 low mid + 1 mid 1 high = mid high mid print(low) print low mid = (low + high)// 2 (low + high)// 2 mid high = mid mid high low = 1 1 low A = list(map(int,input().split())) list(map(int,input().split())) A high = max(A) max(A) high low = mid + 1 mid + 1 low cnt = 0 0 cnt n,k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k cnt += math.ceil(i/mid) - 1 math.ceil(i/mid) - 1 cnt
import math
n,k = map(int,input().split())
A = list(map(int,input().split()))

low = 1
high = max(A)

while low != high:
    mid = (low + high)// 2
    cnt = 0
    for i in A:
        cnt += math.ceil(i/mid) - 1
    if cnt > k :
        low = mid + 1
    else:
        high = mid

print(low)