import numpy as np

N, K = [int(x) for x in input().split()]
A = np.array([int(x) for x in input().split()])
I = np.array([1] * N)

L = np.max(A)

ans = L
low = 1
high = L
while 1:
    if low == high:
        ans = low
        break
    
    mid = (low + high) // 2
    if np.sum((A - I) // mid) <= K:
        high = mid
    else:
        low = mid + 1

print(ans) import numpy as np numpy int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, K = [int(x) for x in input().split()] N [int(x) for x in input().split()] K int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A = np.array([int(x) for x in input().split()]) A np.array([int(x) for x in input().split()]) np.array np array [int(x) for x in input().split()] I = np.array([1] * N) I np.array([1] * N) np.array np array [1] * N [1] 1 N L = np.max(A) L np.max(A) np.max np max A ans = L ans L low = 1 low 1 high = L high L while 1:
    if low == high:
        ans = low
        break
    
    mid = (low + high) // 2
    if np.sum((A - I) // mid) <= K:
        high = mid
    else:
        low = mid + 1 1 if low == high:
        ans = low
        break
    
     low == high low high ans = low ans low break mid = (low + high) // 2 mid (low + high) // 2 low + high low high 2 if np.sum((A - I) // mid) <= K:
        high = mid
    else:
        low = mid + 1 np.sum((A - I) // mid) <= K np.sum((A - I) // mid) np.sum np sum (A - I) // mid A - I A I mid K high = mid high mid low = mid + 1 low mid + 1 mid 1 print(ans) print ans ans = low low ans mid = (low + high) // 2 (low + high) // 2 mid high = mid mid high K = [int(x) for x in input().split()] [int(x) for x in input().split()] K N, K = [int(x) for x in input().split()] [int(x) for x in input().split()] N A = np.array([int(x) for x in input().split()]) np.array([int(x) for x in input().split()]) A low = 1 1 low I = np.array([1] * N) np.array([1] * N) I ans = L L ans high = L L high L = np.max(A) np.max(A) L low = mid + 1 mid + 1 low
import numpy as np

N, K = [int(x) for x in input().split()]
A = np.array([int(x) for x in input().split()])
I = np.array([1] * N)

L = np.max(A)

ans = L
low = 1
high = L
while 1:
    if low == high:
        ans = low
        break
    
    mid = (low + high) // 2
    if np.sum((A - I) // mid) <= K:
        high = mid
    else:
        low = mid + 1

print(ans)