import math as m

def isltK(K,X):
    ccut=0
    for Ai in As:
        ccut += m.ceil(Ai/X)-1
    if ccut <=K:
        return True
    else:
        return False


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

l=1
h=max(As)
while l < h:
    mid = (l+h)//2
    if isltK(K,mid):
        h=mid
    else:
        l=mid+1
print(l) import math as m math def isltK(K,X):
    ccut=0
    for Ai in As:
        ccut += m.ceil(Ai/X)-1
    if ccut <=K:
        return True
    else:
        return False isltK ccut=0 ccut 0 for Ai in As:
        ccut += m.ceil(Ai/X)-1
     Ai As ccut += m.ceil(Ai/X)-1 ccut m.ceil(Ai/X)-1 m.ceil(Ai/X) m.ceil m ceil Ai/X Ai X 1 if ccut <=K:
        return True
    else:
        return False ccut <=K ccut K return True True return False False K K X X N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K As=list(map(int,input().split())) As list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split l=1 l 1 h=max(As) h max(As) max As while l < h:
    mid = (l+h)//2
    if isltK(K,mid):
        h=mid
    else:
        l=mid+1 l < h l h mid = (l+h)//2 mid (l+h)//2 l+h l h 2 if isltK(K,mid):
        h=mid
    else:
        l=mid+1 isltK(K,mid) isltK K mid h=mid h mid l=mid+1 l mid+1 mid 1 print(l) print l N,K=map(int,input().split()) map(int,input().split()) N K=map(int,input().split()) map(int,input().split()) K mid = (l+h)//2 (l+h)//2 mid def isltK(K,X):
    ccut=0
    for Ai in As:
        ccut += m.ceil(Ai/X)-1
    if ccut <=K:
        return True
    else:
        return False def isltK(K,X):
    ccut=0
    for Ai in As:
        ccut += m.ceil(Ai/X)-1
    if ccut <=K:
        return True
    else:
        return False isltK l=mid+1 mid+1 l As=list(map(int,input().split())) list(map(int,input().split())) As h=max(As) max(As) h h=mid mid h l=1 1 l
import math as m

def isltK(K,X):
    ccut=0
    for Ai in As:
        ccut += m.ceil(Ai/X)-1
    if ccut <=K:
        return True
    else:
        return False


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

l=1
h=max(As)
while l < h:
    mid = (l+h)//2
    if isltK(K,mid):
        h=mid
    else:
        l=mid+1
print(l)