import math

def check(A, x, k):
    cut_count = 0
    for number in A:
        cut_count += (math.ceil(number / x)) -1
    return cut_count <= k

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

l = 0
r = 10 ** 9
 
while r - l > 1:
    x = (r + l) // 2
  
    if check(a, x, k):
        r = x
    else:
        l = x   
print(r) import math math def check(A, x, k):
    cut_count = 0
    for number in A:
        cut_count += (math.ceil(number / x)) -1
    return cut_count <= k check cut_count = 0 cut_count 0 for number in A:
        cut_count += (math.ceil(number / x)) -1
     number A cut_count += (math.ceil(number / x)) -1 cut_count (math.ceil(number / x)) -1 math.ceil(number / x) math.ceil math ceil number / x number x 1 return cut_count <= k cut_count <= k cut_count k A A x x k k 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 ans = 0 ans 0 l = 0 l 0 r = 10 ** 9 r 10 ** 9 10 9 while r - l > 1:
    x = (r + l) // 2
  
    if check(a, x, k):
        r = x
    else:
        l = x    r - l > 1 r - l r l 1 x = (r + l) // 2 x (r + l) // 2 r + l r l 2 if check(a, x, k):
        r = x
    else:
        l = x    check(a, x, k) check a x k r = x r x l = x l x print(r) print r n, k = map(int,input().split()) map(int,input().split()) n l = 0 0 l ans = 0 0 ans r = 10 ** 9 10 ** 9 r a = list(map(int, input().split())) list(map(int, input().split())) a x = (r + l) // 2 (r + l) // 2 x r = x x r l = x x l def check(A, x, k):
    cut_count = 0
    for number in A:
        cut_count += (math.ceil(number / x)) -1
    return cut_count <= k def check(A, x, k):
    cut_count = 0
    for number in A:
        cut_count += (math.ceil(number / x)) -1
    return cut_count <= k check k = map(int,input().split()) map(int,input().split()) k
import math

def check(A, x, k):
    cut_count = 0
    for number in A:
        cut_count += (math.ceil(number / x)) -1
    return cut_count <= k

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

l = 0
r = 10 ** 9
 
while r - l > 1:
    x = (r + l) // 2
  
    if check(a, x, k):
        r = x
    else:
        l = x   
print(r)