import math

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

l, r = 0, max(A)
while r - l > 1:
    x = (l + r) // 2
    cnt = 0
    for a in A:
        n = math.ceil(a / x)
        # n = (a + x - 1) // x
        cnt += n - 1
    if cnt > K:
        l = x 
    else:
        r = x

print(r) import math math 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 l, r = 0, max(A) l 0 r max(A) max A while r - l > 1:
    x = (l + r) // 2
    cnt = 0
    for a in A:
        n = math.ceil(a / x)
        # n = (a + x - 1) // x
        cnt += n - 1
    if cnt > K:
        l = x 
    else:
        r = x r - l > 1 r - l r l 1 x = (l + r) // 2 x (l + r) // 2 l + r l r 2 cnt = 0 cnt 0 for a in A:
        n = math.ceil(a / x)
        # n = (a + x - 1) // x
        cnt += n - 1
     a A n = math.ceil(a / x) n math.ceil(a / x) math.ceil math ceil a / x a x cnt += n - 1 cnt n - 1 n 1 if cnt > K:
        l = x 
    else:
        r = x cnt > K cnt K l = x l x r = x r x print(r) print r cnt = 0 0 cnt A = list(map(int, input().split())) list(map(int, input().split())) A K = map(int,input().split()) map(int,input().split()) K n = math.ceil(a / x) math.ceil(a / x) n l = x x l l, r = 0, max(A) 0 l cnt += n - 1 n - 1 cnt x = (l + r) // 2 (l + r) // 2 x r = x x r N, K = map(int,input().split()) map(int,input().split()) N r = 0, max(A) max(A) r
import math

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

l, r = 0, max(A)
while r - l > 1:
    x = (l + r) // 2
    cnt = 0
    for a in A:
        n = math.ceil(a / x)
        # n = (a + x - 1) // x
        cnt += n - 1
    if cnt > K:
        l = x 
    else:
        r = x

print(r)
