n, k = map(int, input().split())
a_i = list(map(int, input().split()))

def f(n):
    cnt = 0
    for a in a_i:
        cnt += (a - 1) // n
    if cnt > k: return False
    else: return True

l, r = 0, max(a_i)
while True:
    if r - l <= 1: break
    val = (l + r) // 2
    if f(val) == True: r = val
    else: l = val
print(r) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k a_i = list(map(int, input().split())) a_i list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def f(n):
    cnt = 0
    for a in a_i:
        cnt += (a - 1) // n
    if cnt > k: return False
    else: return True f cnt = 0 cnt 0 for a in a_i:
        cnt += (a - 1) // n
     a a_i cnt += (a - 1) // n cnt (a - 1) // n a - 1 a 1 n if cnt > k: return False
    else: return True cnt > k cnt k n n l, r = 0, max(a_i) l 0 r max(a_i) max a_i while True:
    if r - l <= 1: break
    val = (l + r) // 2
    if f(val) == True: r = val
    else: l = val True if r - l <= 1: break
     r - l <= 1 r - l r l 1 val = (l + r) // 2 val (l + r) // 2 l + r l r 2 if f(val) == True: r = val
    else: l = val f(val) == True f(val) f val True print(r) print r n, k = map(int, input().split()) map(int, input().split()) n val = (l + r) // 2 (l + r) // 2 val k = map(int, input().split()) map(int, input().split()) k l, r = 0, max(a_i) 0 l a_i = list(map(int, input().split())) list(map(int, input().split())) a_i def f(n):
    cnt = 0
    for a in a_i:
        cnt += (a - 1) // n
    if cnt > k: return False
    else: return True def f(n):
    cnt = 0
    for a in a_i:
        cnt += (a - 1) // n
    if cnt > k: return False
    else: return True f r = 0, max(a_i) max(a_i) r
n, k = map(int, input().split())
a_i = list(map(int, input().split()))

def f(n):
    cnt = 0
    for a in a_i:
        cnt += (a - 1) // n
    if cnt > k: return False
    else: return True

l, r = 0, max(a_i)
while True:
    if r - l <= 1: break
    val = (l + r) // 2
    if f(val) == True: r = val
    else: l = val
print(r)