import math

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

m = 1
M = max(A)

while(M-m>0):
    mm = 0

    mid = (M+m)//2
    for i in range(N):
        mm += math.ceil(A[i]/mid)-1

    if mm>K:
        m = mid+1
    else:
        M = mid

print(math.ceil(m))

 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 m = 1 m 1 M = max(A) M max(A) max A while(M-m>0):
    mm = 0

    mid = (M+m)//2
    for i in range(N):
        mm += math.ceil(A[i]/mid)-1

    if mm>K:
        m = mid+1
    else:
        M = mid M-m>0 M-m M m 0 mm = 0 mm 0 mid = (M+m)//2 mid (M+m)//2 M+m M m 2 for i in range(N):
        mm += math.ceil(A[i]/mid)-1

     i range(N) range N mm += math.ceil(A[i]/mid)-1 mm math.ceil(A[i]/mid)-1 math.ceil(A[i]/mid) math.ceil math ceil A[i]/mid A[i] A i mid 1 if mm>K:
        m = mid+1
    else:
        M = mid mm>K mm K m = mid+1 m mid+1 mid 1 M = mid M mid print(math.ceil(m)) print math.ceil(m) math.ceil math ceil m m = mid+1 mid+1 m mid = (M+m)//2 (M+m)//2 mid mm += math.ceil(A[i]/mid)-1 math.ceil(A[i]/mid)-1 mm mm = 0 0 mm M = mid mid M M = max(A) max(A) M K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N m = 1 1 m A = list(map(int,input().split())) list(map(int,input().split())) A
import math

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

m = 1
M = max(A)

while(M-m>0):
    mm = 0

    mid = (M+m)//2
    for i in range(N):
        mm += math.ceil(A[i]/mid)-1

    if mm>K:
        m = mid+1
    else:
        M = mid

print(math.ceil(m))


