# https://atcoder.jp/contests/abc174/tasks/abc174_e

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

L=0
R=max(A)
i=0
ans=(L+R)/2
cnt=0
right=0
left=0

while i<100:
    i +=1
    for num in A:
        cnt += ceil(num/ans)-1
    if cnt <=K:
        R = ans
    elif cnt>=K:
        L = ans
    else:
        #print("fin",i-1,cnt,ans)
        break           
    ans = (R+L)/2
    cnt=0
        
print(ceil(ans)) from math import ceil,floor 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 i=0 i 0 ans=(L+R)/2 ans (L+R)/2 L+R L R 2 cnt=0 cnt 0 right=0 right 0 left=0 left 0 while i<100:
    i +=1
    for num in A:
        cnt += ceil(num/ans)-1
    if cnt <=K:
        R = ans
    elif cnt>=K:
        L = ans
    else:
        #print("fin",i-1,cnt,ans)
        break           
    ans = (R+L)/2
    cnt=0
         i<100 i 100 i +=1 i 1 for num in A:
        cnt += ceil(num/ans)-1
     num A cnt += ceil(num/ans)-1 cnt ceil(num/ans)-1 ceil(num/ans) ceil num/ans num ans 1 if cnt <=K:
        R = ans
    elif cnt>=K:
        L = ans
    else:
        #print("fin",i-1,cnt,ans)
        break           
     cnt <=K cnt K R = ans R ans elif cnt>=K:
        L = ans
     cnt>=K cnt K L = ans L ans break ans = (R+L)/2 ans (R+L)/2 R+L R L 2 cnt=0 cnt 0 print(ceil(ans)) print ceil(ans) ceil ans i +=1 1 i right=0 0 right ans=(L+R)/2 (L+R)/2 ans A=list(map(int,input().split())) list(map(int,input().split())) A left=0 0 left i=0 0 i R=max(A) max(A) R K=map(int,input().split()) map(int,input().split()) K cnt=0 0 cnt L = ans ans L cnt += ceil(num/ans)-1 ceil(num/ans)-1 cnt cnt=0 0 cnt ans = (R+L)/2 (R+L)/2 ans R = ans ans R N,K=map(int,input().split()) map(int,input().split()) N L=0 0 L
# https://atcoder.jp/contests/abc174/tasks/abc174_e

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

L=0
R=max(A)
i=0
ans=(L+R)/2
cnt=0
right=0
left=0

while i<100:
    i +=1
    for num in A:
        cnt += ceil(num/ans)-1
    if cnt <=K:
        R = ans
    elif cnt>=K:
        L = ans
    else:
        #print("fin",i-1,cnt,ans)
        break           
    ans = (R+L)/2
    cnt=0
        
print(ceil(ans))