import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
l = 0
r = int(1e9)

def f(x):
    count = 0
    for a in A:
        count += int((a-1)/x)
    return count <= K

while r-l > 1:
    x = int((r+l)/2)
    if f(x):
        r = x
    else:
        l = 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 = 0 l 0 r = int(1e9) r int(1e9) int 1e9 def f(x):
    count = 0
    for a in A:
        count += int((a-1)/x)
    return count <= K f count = 0 count 0 for a in A:
        count += int((a-1)/x)
     a A count += int((a-1)/x) count int((a-1)/x) int (a-1)/x a-1 a 1 x return count <= K count <= K count K x x while r-l > 1:
    x = int((r+l)/2)
    if f(x):
        r = x
    else:
        l = x r-l > 1 r-l r l 1 x = int((r+l)/2) x int((r+l)/2) int (r+l)/2 r+l r l 2 if f(x):
        r = x
    else:
        l = x f(x) f x r = x r x l = x l x print(r) print r r = int(1e9) int(1e9) r x = int((r+l)/2) int((r+l)/2) x def f(x):
    count = 0
    for a in A:
        count += int((a-1)/x)
    return count <= K def f(x):
    count = 0
    for a in A:
        count += int((a-1)/x)
    return count <= K f l = 0 0 l l = x x l A = list(map(int, input().split())) list(map(int, input().split())) A N, K = map(int, input().split()) map(int, input().split()) N r = x x r K = map(int, input().split()) map(int, input().split()) K
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
l = 0
r = int(1e9)

def f(x):
    count = 0
    for a in A:
        count += int((a-1)/x)
    return count <= K

while r-l > 1:
    x = int((r+l)/2)
    if f(x):
        r = x
    else:
        l = x
print(r)