# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)

import sys

from math import ceil

def main(N, K, A):

    def cut_times(longest):

        return sum(a // longest for a in A if a > longest)

    under = 0

    r = 10**9

    for i in range(100):

        m = (under + r) / 2

        if cut_times(m) > K: under = m

        else: r = m

    print((ceil(r - 10**-10)))



if __name__ == '__main__':

    input = sys.stdin.readline

    N, K = list(map(int, input().split()))

    *A, = list(map(int, input().split()))

    main(N, K, A)

# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)

import sys

def main(N, K, A):

    lo = 0

    hi = 10**9

    while hi - lo > 1:

        m = (lo + hi) // 2

        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m

        else: lo = m

    print(hi)



if __name__ == '__main__':

    input = sys.stdin.readline

    N, K = list(map(int, input().split()))

    *A, = list(map(int, input().split()))

    main(N, K, A)

# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
from math import ceil


def main(N, K, A):
    def cut_times(longest):
        return sum(a // longest for a in A if a > longest)

    under = 0
    r = 10**9
    for i in range(100):
        m = (under + r) / 2
        if cut_times(m) > K:
            under = m
        else:
            r = m
    print((ceil(r - 10**-10)))


if __name__ == "__main__":
    input = sys.stdin.readline
    N, K = list(map(int, input().split()))
    (*A,) = list(map(int, input().split()))
    main(N, K, A)

# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys


def main(N, K, A):
    lo = 0
    hi = 10**9
    while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K:
            hi = m
        else:
            lo = m
    print(hi)


if __name__ == "__main__":
    input = sys.stdin.readline
    N, K = list(map(int, input().split()))
    (*A,) = list(map(int, input().split()))
    main(N, K, A)

-from math import ceil -    def cut_times(longest): -        return sum(a // longest for a in A if a > longest) - -    under = 0 -    r = 10**9 -    for i in range(100): -        m = (under + r) / 2 -        if cut_times(m) > K: -            under = m +    lo = 0 +    hi = 10**9 +    while hi - lo > 1: +        m = (lo + hi) // 2 +        if sum((a + m - 1) // m - 1 for a in A) <= K: +            hi = m -            r = m -    print((ceil(r - 10**-10))) +            lo = m +    print(hi)