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


def f(n):
    cnt = 0
    for a in A:
            # a/nが偶数の場合
        if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
    return True if K >= cnt else False


l = 0
r = max(A)
# 二分探索
while r - l > 1:
    m = (r+l)//2
    if f(m):
        r = m
    else:
        l = m
print(r) 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(n):
    cnt = 0
    for a in A:
            # a/nが偶数の場合
        if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
    return True if K >= cnt else False f cnt = 0 cnt 0 for a in A:
            # a/nが偶数の場合
        if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
     a A if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
     a % n == 0 a % n a n 0 cnt += a//n-1 cnt a//n-1 a//n a n 1 cnt += a//n cnt a//n a n return True if K >= cnt else False True if K >= cnt else False K >= cnt K cnt True False n n l = 0 l 0 r = max(A) r max(A) max A while r - l > 1:
    m = (r+l)//2
    if f(m):
        r = m
    else:
        l = m r - l > 1 r - l r l 1 m = (r+l)//2 m (r+l)//2 r+l r l 2 if f(m):
        r = m
    else:
        l = m f(m) f m r = m r m l = m l m print(r) print r r = max(A) max(A) r N, K = map(int, input().split()) map(int, input().split()) N def f(n):
    cnt = 0
    for a in A:
            # a/nが偶数の場合
        if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
    return True if K >= cnt else False def f(n):
    cnt = 0
    for a in A:
            # a/nが偶数の場合
        if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
    return True if K >= cnt else False f l = 0 0 l A = list(map(int, input().split())) list(map(int, input().split())) A m = (r+l)//2 (r+l)//2 m l = m m l r = m m r K = map(int, input().split()) map(int, input().split()) K
N, K = map(int, input().split())
A = list(map(int, input().split()))


def f(n):
    cnt = 0
    for a in A:
            # a/nが偶数の場合
        if a % n == 0:
            cnt += a//n-1
        # a/nが奇数の場合
        else:
            cnt += a//n
    return True if K >= cnt else False


l = 0
r = max(A)
# 二分探索
while r - l > 1:
    m = (r+l)//2
    if f(m):
        r = m
    else:
        l = m
print(r)
