from math import ceil

from fractions import Fraction



n, k, *aa = list(map(Fraction, open(0).read().split()))



imp_length = 0

psbl_length = max(aa)



while psbl_length - imp_length > 1:

    mid = (psbl_length + imp_length) // 2

    cost = sum(ceil(a / mid) - 1 for a in aa)

    if cost <= k:

        psbl_length = mid

    else:

        imp_length = mid



print(psbl_length)
n, k, *aa = list(map(int, open(0).read().split()))



imp_length = 0

psbl_length = max(aa)



while psbl_length - imp_length > 1:

    mid = (psbl_length + imp_length) // 2

    cost = sum(0 - -a // mid - 1 for a in aa)

    if cost <= k:

        psbl_length = mid

    else:

        imp_length = mid



print(psbl_length)
from math import ceil
from fractions import Fraction

n, k, *aa = list(map(Fraction, open(0).read().split()))
imp_length = 0
psbl_length = max(aa)
while psbl_length - imp_length > 1:
    mid = (psbl_length + imp_length) // 2
    cost = sum(ceil(a / mid) - 1 for a in aa)
    if cost <= k:
        psbl_length = mid
    else:
        imp_length = mid
print(psbl_length)

n, k, *aa = list(map(int, open(0).read().split()))
imp_length = 0
psbl_length = max(aa)
while psbl_length - imp_length > 1:
    mid = (psbl_length + imp_length) // 2
    cost = sum(0 - -a // mid - 1 for a in aa)
    if cost <= k:
        psbl_length = mid
    else:
        imp_length = mid
print(psbl_length)

-from math import ceil -from fractions import Fraction - -n, k, *aa = list(map(Fraction, open(0).read().split())) +n, k, *aa = list(map(int, open(0).read().split())) -    cost = sum(ceil(a / mid) - 1 for a in aa) +    cost = sum(0 - -a // mid - 1 for a in aa)