import math



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

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



#  にぶたん！ 半開区間二分探索は正義



def calc(x):

    count = 0

    for a in A:

        count += (a - 1) // x



    return count <= K



A.sort(reverse=True)



r = 10 ** 9

l = 0



while abs(r - l) > 1:

    mid = (r + l) // 2

    

    if calc(mid):

        r = mid

    else:

        l = mid



print(r)

import math



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

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



#  めぐる式二分探索で実装



def calc(x):

    count = 0

    for a in A:

        count += (a - 1) // x



    return count <= K



ok = 10 ** 9

ng = 0



while abs(ok - ng) > 1:

    mid = (ok + ng) // 2

    

    if calc(mid):

        ok = mid

    else:

        ng = mid



print(ok)

import math

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
#  にぶたん！ 半開区間二分探索は正義
def calc(x):
    count = 0
    for a in A:
        count += (a - 1) // x
    return count <= K


A.sort(reverse=True)
r = 10**9
l = 0
while abs(r - l) > 1:
    mid = (r + l) // 2
    if calc(mid):
        r = mid
    else:
        l = mid
print(r)

import math

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
#  めぐる式二分探索で実装
def calc(x):
    count = 0
    for a in A:
        count += (a - 1) // x
    return count <= K


ok = 10**9
ng = 0
while abs(ok - ng) > 1:
    mid = (ok + ng) // 2
    if calc(mid):
        ok = mid
    else:
        ng = mid
print(ok)

-#  にぶたん！ 半開区間二分探索は正義 +#  めぐる式二分探索で実装 -A.sort(reverse=True) -r = 10**9 -l = 0 -while abs(r - l) > 1: -    mid = (r + l) // 2 +ok = 10**9 +ng = 0 +while abs(ok - ng) > 1: +    mid = (ok + ng) // 2 -        r = mid +        ok = mid -        l = mid -print(r) +        ng = mid +print(ok)