import copy
from math import ceil
n, k = map(int, input().split())
A = list(map(int, input().split()))

ok = 100000000000
ng = 0


def cal(n):
    s = 0
    for a in A:
        s += ceil(a/n)-1
    return s


while ok-ng > 1:
    mid = (ok+ng)//2
    s = cal(mid)
    if s <= k:
        ok = mid
    else:
        ng = mid
print(ok) import copy copy from math import 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 ok = 100000000000 ok 100000000000 ng = 0 ng 0 def cal(n):
    s = 0
    for a in A:
        s += ceil(a/n)-1
    return s cal s = 0 s 0 for a in A:
        s += ceil(a/n)-1
     a A s += ceil(a/n)-1 s ceil(a/n)-1 ceil(a/n) ceil a/n a n 1 return s s n n while ok-ng > 1:
    mid = (ok+ng)//2
    s = cal(mid)
    if s <= k:
        ok = mid
    else:
        ng = mid ok-ng > 1 ok-ng ok ng 1 mid = (ok+ng)//2 mid (ok+ng)//2 ok+ng ok ng 2 s = cal(mid) s cal(mid) cal mid if s <= k:
        ok = mid
    else:
        ng = mid s <= k s k ok = mid ok mid ng = mid ng mid print(ok) print ok ng = mid mid ng k = map(int, input().split()) map(int, input().split()) k ng = 0 0 ng mid = (ok+ng)//2 (ok+ng)//2 mid s = cal(mid) cal(mid) s n, k = map(int, input().split()) map(int, input().split()) n A = list(map(int, input().split())) list(map(int, input().split())) A def cal(n):
    s = 0
    for a in A:
        s += ceil(a/n)-1
    return s def cal(n):
    s = 0
    for a in A:
        s += ceil(a/n)-1
    return s cal ok = 100000000000 100000000000 ok ok = mid mid ok
import copy
from math import ceil
n, k = map(int, input().split())
A = list(map(int, input().split()))

ok = 100000000000
ng = 0


def cal(n):
    s = 0
    for a in A:
        s += ceil(a/n)-1
    return s


while ok-ng > 1:
    mid = (ok+ng)//2
    s = cal(mid)
    if s <= k:
        ok = mid
    else:
        ng = mid
print(ok)
