def is_good(mid, key):

    return sum(count_cuts(a, mid) for a in A) <= key





def binary_search(key):

    bad, good = 0, 2 * 10 ** 14 + 1

    while good - bad > 1:

        mid = (bad + good) // 2

        if is_good(mid, key):

            good = mid

        else:

            bad = mid

    return good





def count_cuts(a, unit):

    return (a + unit - 1) // unit - 1





N, K, *A = list(map(int, open(0).read().split()))

print((binary_search(K)))

def count_cuts(a, unit):

    return (a + unit - 1) // unit - 1





def is_good(mid, key):

    return sum(count_cuts(a, mid) for a in A) <= key





def binary_search(key):

    bad, good = 0, 1_000_000_000

    while good - bad > 1:

        mid = (bad + good) // 2

        if is_good(mid, key):

            good = mid

        else:

            bad = mid

    return good





N, K, *A = list(map(int, open(0).read().split()))

print((binary_search(K)))

def is_good(mid, key):
    return sum(count_cuts(a, mid) for a in A) <= key


def binary_search(key):
    bad, good = 0, 2 * 10**14 + 1
    while good - bad > 1:
        mid = (bad + good) // 2
        if is_good(mid, key):
            good = mid
        else:
            bad = mid
    return good


def count_cuts(a, unit):
    return (a + unit - 1) // unit - 1


N, K, *A = list(map(int, open(0).read().split()))
print((binary_search(K)))

def count_cuts(a, unit):
    return (a + unit - 1) // unit - 1


def is_good(mid, key):
    return sum(count_cuts(a, mid) for a in A) <= key


def binary_search(key):
    bad, good = 0, 1_000_000_000
    while good - bad > 1:
        mid = (bad + good) // 2
        if is_good(mid, key):
            good = mid
        else:
            bad = mid
    return good


N, K, *A = list(map(int, open(0).read().split()))
print((binary_search(K)))

+def count_cuts(a, unit): +    return (a + unit - 1) // unit - 1 + + -    bad, good = 0, 2 * 10**14 + 1 +    bad, good = 0, 1_000_000_000 -def count_cuts(a, unit): -    return (a + unit - 1) // unit - 1 - -