import math
def is_lt_or_e_K(k, x, a):
    if k >= sum([math.ceil(i / x) - 1 for i in a]):
        return True
    else:
        return False 
n, k = map(int, input().split())
a = list(map(int, input().split()))
high = max(a)
low = 0
while 1:
    if high - low < 2:
        break
    x = (high + low) // 2
    if is_lt_or_e_K(k, x, a):
        high = x
    else:
        low = x
print(high) import math math def is_lt_or_e_K(k, x, a):
    if k >= sum([math.ceil(i / x) - 1 for i in a]):
        return True
    else:
        return False  is_lt_or_e_K if k >= sum([math.ceil(i / x) - 1 for i in a]):
        return True
    else:
        return False  k >= sum([math.ceil(i / x) - 1 for i in a]) k sum([math.ceil(i / x) - 1 for i in a]) sum [math.ceil(i / x) - 1 for i in a] return True True return False False k k x x a a 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 high = max(a) high max(a) max a low = 0 low 0 while 1:
    if high - low < 2:
        break
    x = (high + low) // 2
    if is_lt_or_e_K(k, x, a):
        high = x
    else:
        low = x 1 if high - low < 2:
        break
     high - low < 2 high - low high low 2 break x = (high + low) // 2 x (high + low) // 2 high + low high low 2 if is_lt_or_e_K(k, x, a):
        high = x
    else:
        low = x is_lt_or_e_K(k, x, a) is_lt_or_e_K k x a high = x high x low = x low x print(high) print high x = (high + low) // 2 (high + low) // 2 x low = 0 0 low high = max(a) max(a) high def is_lt_or_e_K(k, x, a):
    if k >= sum([math.ceil(i / x) - 1 for i in a]):
        return True
    else:
        return False  def is_lt_or_e_K(k, x, a):
    if k >= sum([math.ceil(i / x) - 1 for i in a]):
        return True
    else:
        return False  is_lt_or_e_K a = list(map(int, input().split())) list(map(int, input().split())) a k = map(int, input().split()) map(int, input().split()) k high = x x high low = x x low n, k = map(int, input().split()) map(int, input().split()) n
import math
def is_lt_or_e_K(k, x, a):
    if k >= sum([math.ceil(i / x) - 1 for i in a]):
        return True
    else:
        return False 
n, k = map(int, input().split())
a = list(map(int, input().split()))
high = max(a)
low = 0
while 1:
    if high - low < 2:
        break
    x = (high + low) // 2
    if is_lt_or_e_K(k, x, a):
        high = x
    else:
        low = x
print(high)
