from math import floor, ceil

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
l = 0
r = max(a)
while r - l > 1:
    c = (l+r)//2
    cnt = 0
    for i in a:
        cnt += max(ceil(i/c) - 1, 0)
    if cnt <= k:
        r = c
    else:
        l = c
print(r) from math import floor, ceil 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 a.sort(reverse=True) a.sort a sort reverse=True reverse True l = 0 l 0 r = max(a) r max(a) max a while r - l > 1:
    c = (l+r)//2
    cnt = 0
    for i in a:
        cnt += max(ceil(i/c) - 1, 0)
    if cnt <= k:
        r = c
    else:
        l = c r - l > 1 r - l r l 1 c = (l+r)//2 c (l+r)//2 l+r l r 2 cnt = 0 cnt 0 for i in a:
        cnt += max(ceil(i/c) - 1, 0)
     i a cnt += max(ceil(i/c) - 1, 0) cnt max(ceil(i/c) - 1, 0) max ceil(i/c) - 1 ceil(i/c) ceil i/c i c 1 0 if cnt <= k:
        r = c
    else:
        l = c cnt <= k cnt k r = c r c l = c l c print(r) print r c = (l+r)//2 (l+r)//2 c cnt = 0 0 cnt a = list(map(int, input().split())) list(map(int, input().split())) a l = 0 0 l cnt += max(ceil(i/c) - 1, 0) max(ceil(i/c) - 1, 0) cnt r = max(a) max(a) r r = c c r l = c c l k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n
from math import floor, ceil

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
l = 0
r = max(a)
while r - l > 1:
    c = (l+r)//2
    cnt = 0
    for i in a:
        cnt += max(ceil(i/c) - 1, 0)
    if cnt <= k:
        r = c
    else:
        l = c
print(r)