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

def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=(A[i]-1)//ans
    if cut>K:
        return False
    else:
        return True


ansp=max(A)
ansm=0
ans=(ansp+ansm)//2
d=1
while ansp-ansm>d:
    
    if judge(ans,K,A):
        ansp=ans
        
    else:
        ansm=ans
        
    ans=(ansp+ansm)//2
print(ansp) 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 def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=(A[i]-1)//ans
    if cut>K:
        return False
    else:
        return True judge cut=0 cut 0 for i in range(len(A)):
        cut+=(A[i]-1)//ans
     i range(len(A)) range len(A) len A cut+=(A[i]-1)//ans cut (A[i]-1)//ans A[i]-1 A[i] A i 1 ans if cut>K:
        return False
    else:
        return True cut>K cut K return False False return True True ans ans K K A A ansp=max(A) ansp max(A) max A ansm=0 ansm 0 ans=(ansp+ansm)//2 ans (ansp+ansm)//2 ansp+ansm ansp ansm 2 d=1 d 1 while ansp-ansm>d:
    
    if judge(ans,K,A):
        ansp=ans
        
    else:
        ansm=ans
        
    ans=(ansp+ansm)//2 ansp-ansm>d ansp-ansm ansp ansm d if judge(ans,K,A):
        ansp=ans
        
    else:
        ansm=ans
        
     judge(ans,K,A) judge ans K A ansp=ans ansp ans ansm=ans ansm ans ans=(ansp+ansm)//2 ans (ansp+ansm)//2 ansp+ansm ansp ansm 2 print(ansp) print ansp d=1 1 d ans=(ansp+ansm)//2 (ansp+ansm)//2 ans N, K=map(int,input().split()) map(int,input().split()) N ansp=max(A) max(A) ansp K=map(int,input().split()) map(int,input().split()) K ans=(ansp+ansm)//2 (ansp+ansm)//2 ans A=list(map(int,input().split())) list(map(int,input().split())) A def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=(A[i]-1)//ans
    if cut>K:
        return False
    else:
        return True def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=(A[i]-1)//ans
    if cut>K:
        return False
    else:
        return True judge ansm=0 0 ansm ansp=ans ans ansp ansm=ans ans ansm
import math
N, K=map(int,input().split())
A=list(map(int,input().split()))

def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=(A[i]-1)//ans
    if cut>K:
        return False
    else:
        return True


ansp=max(A)
ansm=0
ans=(ansp+ansm)//2
d=1
while ansp-ansm>d:
    
    if judge(ans,K,A):
        ansp=ans
        
    else:
        ansm=ans
        
    ans=(ansp+ansm)//2
print(ansp)