n,k=map(int,input().split())
arr=list(map(int,input().split()))
def isvalid(mid,k):
    if mid==0:
        return False
    ans=k
    for i in arr:
        if i>mid:
            ans-=i//mid
    return ans>=0


l=0
r=10**9
while(l<r):
    mid=(l+r)//2
    if isvalid(mid,k):
        r=mid
    else:
        l=mid+1
print(l)










 n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k arr=list(map(int,input().split())) arr list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def isvalid(mid,k):
    if mid==0:
        return False
    ans=k
    for i in arr:
        if i>mid:
            ans-=i//mid
    return ans>=0 isvalid if mid==0:
        return False
     mid==0 mid 0 return False False ans=k ans k for i in arr:
        if i>mid:
            ans-=i//mid
     i arr if i>mid:
            ans-=i//mid
     i>mid i mid ans-=i//mid ans i//mid i mid return ans>=0 ans>=0 ans 0 mid mid k k l=0 l 0 r=10**9 r 10**9 10 9 while(l<r):
    mid=(l+r)//2
    if isvalid(mid,k):
        r=mid
    else:
        l=mid+1 l<r l r mid=(l+r)//2 mid (l+r)//2 l+r l r 2 if isvalid(mid,k):
        r=mid
    else:
        l=mid+1 isvalid(mid,k) isvalid mid k r=mid r mid l=mid+1 l mid+1 mid 1 print(l) print l l=0 0 l mid=(l+r)//2 (l+r)//2 mid k=map(int,input().split()) map(int,input().split()) k arr=list(map(int,input().split())) list(map(int,input().split())) arr r=mid mid r l=mid+1 mid+1 l r=10**9 10**9 r def isvalid(mid,k):
    if mid==0:
        return False
    ans=k
    for i in arr:
        if i>mid:
            ans-=i//mid
    return ans>=0 def isvalid(mid,k):
    if mid==0:
        return False
    ans=k
    for i in arr:
        if i>mid:
            ans-=i//mid
    return ans>=0 isvalid n,k=map(int,input().split()) map(int,input().split()) n
n,k=map(int,input().split())
arr=list(map(int,input().split()))
def isvalid(mid,k):
    if mid==0:
        return False
    ans=k
    for i in arr:
        if i>mid:
            ans-=i//mid
    return ans>=0


l=0
r=10**9
while(l<r):
    mid=(l+r)//2
    if isvalid(mid,k):
        r=mid
    else:
        l=mid+1
print(l)











