import math

def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    def _f(length: int) -> bool:
        count = 0
        for a in A:
            count += int((a-1) / length)
        return count <= K

    l = 0
    r = 10**9
    while (r-l) > 1:
        mid = (l+r) // 2
        if _f(mid):
            r = mid
        else:
            l = mid
    print(r)

if __name__ == "__main__":
    resolve() import math math def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    def _f(length: int) -> bool:
        count = 0
        for a in A:
            count += int((a-1) / length)
        return count <= K

    l = 0
    r = 10**9
    while (r-l) > 1:
        mid = (l+r) // 2
        if _f(mid):
            r = mid
        else:
            l = mid
    print(r) resolve 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 def _f(length: int) -> bool:
        count = 0
        for a in A:
            count += int((a-1) / length)
        return count <= K

     _f count = 0 count 0 for a in A:
            count += int((a-1) / length)
         a A count += int((a-1) / length) count int((a-1) / length) int (a-1) / length a-1 a 1 length return count <= K count <= K count K length: int length l = 0 l 0 r = 10**9 r 10**9 10 9 while (r-l) > 1:
        mid = (l+r) // 2
        if _f(mid):
            r = mid
        else:
            l = mid
     (r-l) > 1 r-l r l 1 mid = (l+r) // 2 mid (l+r) // 2 l+r l r 2 if _f(mid):
            r = mid
        else:
            l = mid
     _f(mid) _f mid r = mid r mid l = mid l mid print(r) print r if __name__ == "__main__":
    resolve() __name__ == "__main__" __name__ "__main__" resolve() resolve def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    def _f(length: int) -> bool:
        count = 0
        for a in A:
            count += int((a-1) / length)
        return count <= K

    l = 0
    r = 10**9
    while (r-l) > 1:
        mid = (l+r) // 2
        if _f(mid):
            r = mid
        else:
            l = mid
    print(r) def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    def _f(length: int) -> bool:
        count = 0
        for a in A:
            count += int((a-1) / length)
        return count <= K

    l = 0
    r = 10**9
    while (r-l) > 1:
        mid = (l+r) // 2
        if _f(mid):
            r = mid
        else:
            l = mid
    print(r) resolve
import math

def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    def _f(length: int) -> bool:
        count = 0
        for a in A:
            count += int((a-1) / length)
        return count <= K

    l = 0
    r = 10**9
    while (r-l) > 1:
        mid = (l+r) // 2
        if _f(mid):
            r = mid
        else:
            l = mid
    print(r)

if __name__ == "__main__":
    resolve()