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

a = list(map(int, input().split()))

def cal(x):
    s = 0
    for aa in a:
        s += math.ceil(aa / x) - 1
    if s <= K: return True
    else: return False

l = 0
r = max(a)
while r - l > 1:
    mid = (l + r) // 2
    if cal(mid):
        r = mid
    else:
        l = mid
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 def cal(x):
    s = 0
    for aa in a:
        s += math.ceil(aa / x) - 1
    if s <= K: return True
    else: return False cal s = 0 s 0 for aa in a:
        s += math.ceil(aa / x) - 1
     aa a s += math.ceil(aa / x) - 1 s math.ceil(aa / x) - 1 math.ceil(aa / x) math.ceil math ceil aa / x aa x 1 if s <= K: return True
    else: return False s <= K s K x x l = 0 l 0 r = max(a) r max(a) max a while r - l > 1:
    mid = (l + r) // 2
    if cal(mid):
        r = mid
    else:
        l = mid r - l > 1 r - l r l 1 mid = (l + r) // 2 mid (l + r) // 2 l + r l r 2 if cal(mid):
        r = mid
    else:
        l = mid cal(mid) cal mid r = mid r mid l = mid l mid print(r) print r r = mid mid r N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K mid = (l + r) // 2 (l + r) // 2 mid def cal(x):
    s = 0
    for aa in a:
        s += math.ceil(aa / x) - 1
    if s <= K: return True
    else: return False def cal(x):
    s = 0
    for aa in a:
        s += math.ceil(aa / x) - 1
    if s <= K: return True
    else: return False cal l = 0 0 l a = list(map(int, input().split())) list(map(int, input().split())) a l = mid mid l r = max(a) max(a) r
import math
N, K = map(int, input().split())

a = list(map(int, input().split()))

def cal(x):
    s = 0
    for aa in a:
        s += math.ceil(aa / x) - 1
    if s <= K: return True
    else: return False

l = 0
r = max(a)
while r - l > 1:
    mid = (l + r) // 2
    if cal(mid):
        r = mid
    else:
        l = mid
print(r)