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


print(low)