# E - Logs
import sys
sys.setrecursionlimit(1000000)

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

def rec(l,r):
    global N,K,A
    if l==r:
        return l
    tmp = (l+r)//2
    ans = 0
    for i in range(N):
        ans += (A[i]-0.001)//tmp
    if ans<=K:
        return rec(l,tmp)
    else:
        return rec(tmp+1,r)
    
print(rec(1,max(A))) import sys sys sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 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 rec(l,r):
    global N,K,A
    if l==r:
        return l
    tmp = (l+r)//2
    ans = 0
    for i in range(N):
        ans += (A[i]-0.001)//tmp
    if ans<=K:
        return rec(l,tmp)
    else:
        return rec(tmp+1,r)
     rec global N,K,A if l==r:
        return l
     l==r l r return l l tmp = (l+r)//2 tmp (l+r)//2 l+r l r 2 ans = 0 ans 0 for i in range(N):
        ans += (A[i]-0.001)//tmp
     i range(N) range N ans += (A[i]-0.001)//tmp ans (A[i]-0.001)//tmp A[i]-0.001 A[i] A i 0.001 tmp if ans<=K:
        return rec(l,tmp)
    else:
        return rec(tmp+1,r)
     ans<=K ans K return rec(l,tmp) rec(l,tmp) rec l tmp return rec(tmp+1,r) rec(tmp+1,r) rec tmp+1 tmp 1 r l l r r print(rec(1,max(A))) print rec(1,max(A)) rec 1 max(A) max A N,K = map(int,input().split()) map(int,input().split()) N def rec(l,r):
    global N,K,A
    if l==r:
        return l
    tmp = (l+r)//2
    ans = 0
    for i in range(N):
        ans += (A[i]-0.001)//tmp
    if ans<=K:
        return rec(l,tmp)
    else:
        return rec(tmp+1,r)
     def rec(l,r):
    global N,K,A
    if l==r:
        return l
    tmp = (l+r)//2
    ans = 0
    for i in range(N):
        ans += (A[i]-0.001)//tmp
    if ans<=K:
        return rec(l,tmp)
    else:
        return rec(tmp+1,r)
     rec A = list(map(int,input().split())) list(map(int,input().split())) A K = map(int,input().split()) map(int,input().split()) K
# E - Logs
import sys
sys.setrecursionlimit(1000000)

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

def rec(l,r):
    global N,K,A
    if l==r:
        return l
    tmp = (l+r)//2
    ans = 0
    for i in range(N):
        ans += (A[i]-0.001)//tmp
    if ans<=K:
        return rec(l,tmp)
    else:
        return rec(tmp+1,r)
    
print(rec(1,max(A)))