import math

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

def cond(x):
    s = 0
    for i in range(n):
        s += math.ceil(a[i]/x)-1
    return s <= k

l, r = 0, 10**9
while l+1 < r:
    mid = (l+r)//2
    if cond(mid):
        r = mid
    else:
        l = mid
print(r) 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 cond(x):
    s = 0
    for i in range(n):
        s += math.ceil(a[i]/x)-1
    return s <= k cond s = 0 s 0 for i in range(n):
        s += math.ceil(a[i]/x)-1
     i range(n) range n s += math.ceil(a[i]/x)-1 s math.ceil(a[i]/x)-1 math.ceil(a[i]/x) math.ceil math ceil a[i]/x a[i] a i x 1 return s <= k s <= k s k x x l, r = 0, 10**9 l 0 r 10**9 10 9 while l+1 < r:
    mid = (l+r)//2
    if cond(mid):
        r = mid
    else:
        l = mid l+1 < r l+1 l 1 r mid = (l+r)//2 mid (l+r)//2 l+r l r 2 if cond(mid):
        r = mid
    else:
        l = mid cond(mid) cond mid r = mid r mid l = mid l mid print(r) print r l, r = 0, 10**9 0 l l = mid mid l r = 0, 10**9 10**9 r mid = (l+r)//2 (l+r)//2 mid k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n def cond(x):
    s = 0
    for i in range(n):
        s += math.ceil(a[i]/x)-1
    return s <= k def cond(x):
    s = 0
    for i in range(n):
        s += math.ceil(a[i]/x)-1
    return s <= k cond a = list(map(int, input().split())) list(map(int, input().split())) a r = mid mid r
import math

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

def cond(x):
    s = 0
    for i in range(n):
        s += math.ceil(a[i]/x)-1
    return s <= k

l, r = 0, 10**9
while l+1 < r:
    mid = (l+r)//2
    if cond(mid):
        r = mid
    else:
        l = mid
print(r)