import heapq
n , k = map(int,input().split())
a = list(map(int,input().split()))
lef = 0
rig = max(a)
while rig - lef != 1:
    now = -(-(lef+rig)//2)
    cou = 0
    for i in range(n):
        cou += -(-a[i]//now) - 1
    if cou <= k:
        rig = now
    elif cou > k:
        lef = now
print(rig) import heapq heapq 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 lef = 0 lef 0 rig = max(a) rig max(a) max a while rig - lef != 1:
    now = -(-(lef+rig)//2)
    cou = 0
    for i in range(n):
        cou += -(-a[i]//now) - 1
    if cou <= k:
        rig = now
    elif cou > k:
        lef = now rig - lef != 1 rig - lef rig lef 1 now = -(-(lef+rig)//2) now -(-(lef+rig)//2) -(lef+rig)//2 -(lef+rig) lef+rig lef rig 2 cou = 0 cou 0 for i in range(n):
        cou += -(-a[i]//now) - 1
     i range(n) range n cou += -(-a[i]//now) - 1 cou -(-a[i]//now) - 1 -(-a[i]//now) -a[i]//now -a[i] a[i] a i now 1 if cou <= k:
        rig = now
    elif cou > k:
        lef = now cou <= k cou k rig = now rig now elif cou > k:
        lef = now cou > k cou k lef = now lef now print(rig) print rig lef = now now lef rig = now now rig now = -(-(lef+rig)//2) -(-(lef+rig)//2) now a = list(map(int,input().split())) list(map(int,input().split())) a n , k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k rig = max(a) max(a) rig lef = 0 0 lef cou = 0 0 cou cou += -(-a[i]//now) - 1 -(-a[i]//now) - 1 cou
import heapq
n , k = map(int,input().split())
a = list(map(int,input().split()))
lef = 0
rig = max(a)
while rig - lef != 1:
    now = -(-(lef+rig)//2)
    cou = 0
    for i in range(n):
        cou += -(-a[i]//now) - 1
    if cou <= k:
        rig = now
    elif cou > k:
        lef = now
print(rig)