from bisect import *
from heapq import *
import math
mod = 10**9+7
N, K = map(int, input().split())
A = list(map(int, input().split()))
l = 0
r = 10**9+1
while l+1 < r:
    x = (l+r)//2
    k = 0
    for a in A:
        k += math.ceil(a/x)-1
        if k > K:
            break
    if K < k:
        l = x
    else:
        r = x
print(r) from bisect import * from heapq import * import math math mod = 10**9+7 mod 10**9+7 10**9 10 9 7 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 = 10**9+1 r 10**9+1 10**9 10 9 1 while l+1 < r:
    x = (l+r)//2
    k = 0
    for a in A:
        k += math.ceil(a/x)-1
        if k > K:
            break
    if K < k:
        l = x
    else:
        r = x l+1 < r l+1 l 1 r x = (l+r)//2 x (l+r)//2 l+r l r 2 k = 0 k 0 for a in A:
        k += math.ceil(a/x)-1
        if k > K:
            break
     a A k += math.ceil(a/x)-1 k math.ceil(a/x)-1 math.ceil(a/x) math.ceil math ceil a/x a x 1 if k > K:
            break
     k > K k K break if K < k:
        l = x
    else:
        r = x K < k K k l = x l x r = x r x print(r) print r N, K = map(int, input().split()) map(int, input().split()) N k += math.ceil(a/x)-1 math.ceil(a/x)-1 k k = 0 0 k K = map(int, input().split()) map(int, input().split()) K r = 10**9+1 10**9+1 r A = list(map(int, input().split())) list(map(int, input().split())) A r = x x r mod = 10**9+7 10**9+7 mod l = 0 0 l x = (l+r)//2 (l+r)//2 x l = x x l
from bisect import *
from heapq import *
import math
mod = 10**9+7
N, K = map(int, input().split())
A = list(map(int, input().split()))
l = 0
r = 10**9+1
while l+1 < r:
    x = (l+r)//2
    k = 0
    for a in A:
        k += math.ceil(a/x)-1
        if k > K:
            break
    if K < k:
        l = x
    else:
        r = x
print(r)