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

l, r = (A[0], 1)
def is_ok(c):
    x = sum([math.ceil(a/c)-1 for a in A])
    return x <= K

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

l, r = (A[0], 1)
def is_ok(c):
    x = sum([math.ceil(a/c)-1 for a in A])
    return x <= K

l, r = max(A), 0
while l - r > 1:
    c = (l + r) // 2
    if is_ok(c):
        l = c
    else:
        r = c
print(l)
