import math

N,K=map(int,input().split())
A=list(map(int, input().split()))
l=0
r=max(A)
while not l+1==r:
    x=(r+l)//2
    k=0
    for a in A:
        k+=math.ceil(a/x)-1
    if k<=K:
        r=x
    else:
        l=x
print(r) 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 l=0 l 0 r=max(A) r max(A) max A while not l+1==r:
    x=(r+l)//2
    k=0
    for a in A:
        k+=math.ceil(a/x)-1
    if k<=K:
        r=x
    else:
        l=x not l+1==r l+1==r l+1 l 1 r x=(r+l)//2 x (r+l)//2 r+l r l 2 k=0 k 0 for a in A:
        k+=math.ceil(a/x)-1
     a A k+=math.ceil(a/x)-1 k math.ceil(a/x)-1 math.ceil(a/x) math.ceil math ceil a/x a x 1 if k<=K:
        r=x
    else:
        l=x k<=K k K r=x r x l=x l x print(r) print r A=list(map(int, input().split())) list(map(int, input().split())) A k+=math.ceil(a/x)-1 math.ceil(a/x)-1 k l=0 0 l r=x x r k=0 0 k l=x x l N,K=map(int,input().split()) map(int,input().split()) N K=map(int,input().split()) map(int,input().split()) K r=max(A) max(A) r x=(r+l)//2 (r+l)//2 x
import math

N,K=map(int,input().split())
A=list(map(int, input().split()))
l=0
r=max(A)
while not l+1==r:
    x=(r+l)//2
    k=0
    for a in A:
        k+=math.ceil(a/x)-1
    if k<=K:
        r=x
    else:
        l=x
print(r)