# ABC174 E

n, k = map(int, input().split())
a_l = [int(x) for x in input().split()]

left = 0
right = max(a_l)


def cut(len):
    ret = 0
    for i in range(n):
        if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
    return ret


while (right - left) > 1:
    _q = (left + right) // 2
    _ret = cut(_q)
    if k >= _ret:
        right = _q
    else:
        left = _q

print(right) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a_l = [int(x) for x in input().split()] a_l [int(x) for x in input().split()] left = 0 left 0 right = max(a_l) right max(a_l) max a_l def cut(len):
    ret = 0
    for i in range(n):
        if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
    return ret cut ret = 0 ret 0 for i in range(n):
        if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
     i range(n) range n if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
     a_l[i] % len == 0 a_l[i] % len a_l[i] a_l i len 0 ret += a_l[i] // len - 1 ret a_l[i] // len - 1 a_l[i] // len a_l[i] a_l i len 1 ret += a_l[i] // len ret a_l[i] // len a_l[i] a_l i len return ret ret len len while (right - left) > 1:
    _q = (left + right) // 2
    _ret = cut(_q)
    if k >= _ret:
        right = _q
    else:
        left = _q (right - left) > 1 right - left right left 1 _q = (left + right) // 2 _q (left + right) // 2 left + right left right 2 _ret = cut(_q) _ret cut(_q) cut _q if k >= _ret:
        right = _q
    else:
        left = _q k >= _ret k _ret right = _q right _q left = _q left _q print(right) print right a_l = [int(x) for x in input().split()] [int(x) for x in input().split()] a_l _q = (left + right) // 2 (left + right) // 2 _q n, k = map(int, input().split()) map(int, input().split()) n def cut(len):
    ret = 0
    for i in range(n):
        if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
    return ret def cut(len):
    ret = 0
    for i in range(n):
        if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
    return ret cut k = map(int, input().split()) map(int, input().split()) k _ret = cut(_q) cut(_q) _ret left = 0 0 left left = _q _q left right = max(a_l) max(a_l) right right = _q _q right
# ABC174 E

n, k = map(int, input().split())
a_l = [int(x) for x in input().split()]

left = 0
right = max(a_l)


def cut(len):
    ret = 0
    for i in range(n):
        if a_l[i] % len == 0:
            ret += a_l[i] // len - 1
        else:
            ret += a_l[i] // len
    return ret


while (right - left) > 1:
    _q = (left + right) // 2
    _ret = cut(_q)
    if k >= _ret:
        right = _q
    else:
        left = _q

print(right)
