import math

n,k = map(int,input().split())
a = list(map(int,input().split()))

def cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an

left = 0
right = 10**9

for i in range(100):
    m = (left + right) / 2
    
    b = cal(a,m)
    
    if b > k:
        left = m
    else:
        right = m
        
print(math.ceil(m)) 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 cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an cal an = 0 an 0 for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
     i range(len(lis)) range len(lis) len lis an += (math.ceil(lis[i] / x) - 1) an math.ceil(lis[i] / x) - 1 math.ceil(lis[i] / x) math.ceil math ceil lis[i] / x lis[i] lis i x 1 return an an lis lis x x left = 0 left 0 right = 10**9 right 10**9 10 9 for i in range(100):
    m = (left + right) / 2
    
    b = cal(a,m)
    
    if b > k:
        left = m
    else:
        right = m
         i range(100) range 100 m = (left + right) / 2 m (left + right) / 2 left + right left right 2 b = cal(a,m) b cal(a,m) cal a m if b > k:
        left = m
    else:
        right = m
         b > k b k left = m left m right = m right m print(math.ceil(m)) print math.ceil(m) math.ceil math ceil m b = cal(a,m) cal(a,m) b k = map(int,input().split()) map(int,input().split()) k right = 10**9 10**9 right left = m m left n,k = map(int,input().split()) map(int,input().split()) n a = list(map(int,input().split())) list(map(int,input().split())) a left = 0 0 left right = m m right def cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an def cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an cal m = (left + right) / 2 (left + right) / 2 m
import math

n,k = map(int,input().split())
a = list(map(int,input().split()))

def cal(lis,x):
    an = 0
    for i in range(len(lis)):
        an += (math.ceil(lis[i] / x) - 1)
        
    return an

left = 0
right = 10**9

for i in range(100):
    m = (left + right) / 2
    
    b = cal(a,m)
    
    if b > k:
        left = m
    else:
        right = m
        
print(math.ceil(m))