from sys import stdin
input = stdin.buffer.readline
n, k = map(int, input().split())
*a, = map(int, input().split())
def f(mx):
    cnt = 0
    for i in a:
        cnt += (i + mx - 1) // mx - 1
    return cnt
l, r = 1, int(1e9)
while l < r:
    m = (l + r) >> 1
    if f(m) > k:
        l = m + 1
    else:
        r = m
print(r) from sys import stdin input = stdin.buffer.readline input stdin.buffer.readline stdin.buffer stdin buffer readline n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k *a, = map(int, input().split()) *a a map(int, input().split()) map int input().split() ().split () input split def f(mx):
    cnt = 0
    for i in a:
        cnt += (i + mx - 1) // mx - 1
    return cnt f cnt = 0 cnt 0 for i in a:
        cnt += (i + mx - 1) // mx - 1
     i a cnt += (i + mx - 1) // mx - 1 cnt (i + mx - 1) // mx - 1 (i + mx - 1) // mx i + mx - 1 i + mx i mx 1 mx 1 return cnt cnt mx mx l, r = 1, int(1e9) l 1 r int(1e9) int 1e9 while l < r:
    m = (l + r) >> 1
    if f(m) > k:
        l = m + 1
    else:
        r = m l < r l r m = (l + r) >> 1 m (l + r) >> 1 l + r l r 1 if f(m) > k:
        l = m + 1
    else:
        r = m f(m) > k f(m) f m k l = m + 1 l m + 1 m 1 r = m r m print(r) print r r = m m r input = stdin.buffer.readline stdin.buffer.readline input n, k = map(int, input().split()) map(int, input().split()) n m = (l + r) >> 1 (l + r) >> 1 m l, r = 1, int(1e9) 1 l def f(mx):
    cnt = 0
    for i in a:
        cnt += (i + mx - 1) // mx - 1
    return cnt def f(mx):
    cnt = 0
    for i in a:
        cnt += (i + mx - 1) // mx - 1
    return cnt f k = map(int, input().split()) map(int, input().split()) k r = 1, int(1e9) int(1e9) r l = m + 1 m + 1 l
from sys import stdin
input = stdin.buffer.readline
n, k = map(int, input().split())
*a, = map(int, input().split())
def f(mx):
    cnt = 0
    for i in a:
        cnt += (i + mx - 1) // mx - 1
    return cnt
l, r = 1, int(1e9)
while l < r:
    m = (l + r) >> 1
    if f(m) > k:
        l = m + 1
    else:
        r = m
print(r)
