import math
N, K = map(int,input().split())
logs = list(map(int,input().split()))
a = 0
b = max(logs)
b_memo = set()
count=0
flg =0
while math.ceil(a) != math.ceil(b):
    c = (a+b)/2
    times = []
    for i in logs:
        times.append(math.floor(i/c))
    if sum(times) > K:
        a = c
    else:
        b = c
    if b - a < 0.001:
        count +=1
    if count >20:
        flg+=1
        break
if flg == 0:         
    print(math.ceil(b))
else:
    a = math.ceil(a)
    times = []
    for j in logs:
        times.append(math.floor(i/a))
    if sum(times) > K:
        print(math.ceil(b))   
    else:
        print(math.ceil(a))  import math math N, K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K logs = list(map(int,input().split())) logs list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a = 0 a 0 b = max(logs) b max(logs) max logs b_memo = set() b_memo set() set count=0 count 0 flg =0 flg 0 while math.ceil(a) != math.ceil(b):
    c = (a+b)/2
    times = []
    for i in logs:
        times.append(math.floor(i/c))
    if sum(times) > K:
        a = c
    else:
        b = c
    if b - a < 0.001:
        count +=1
    if count >20:
        flg+=1
        break math.ceil(a) != math.ceil(b) math.ceil(a) math.ceil math ceil a math.ceil(b) math.ceil math ceil b c = (a+b)/2 c (a+b)/2 a+b a b 2 times = [] times [] for i in logs:
        times.append(math.floor(i/c))
     i logs times.append(math.floor(i/c)) times.append times append math.floor(i/c) math.floor math floor i/c i c if sum(times) > K:
        a = c
    else:
        b = c
     sum(times) > K sum(times) sum times K a = c a c b = c b c if b - a < 0.001:
        count +=1
     b - a < 0.001 b - a b a 0.001 count +=1 count 1 if count >20:
        flg+=1
        break count >20 count 20 flg+=1 flg 1 break if flg == 0:         
    print(math.ceil(b))
else:
    a = math.ceil(a)
    times = []
    for j in logs:
        times.append(math.floor(i/a))
    if sum(times) > K:
        print(math.ceil(b))   
    else:
        print(math.ceil(a))  flg == 0 flg 0 print(math.ceil(b)) print math.ceil(b) math.ceil math ceil b a = math.ceil(a) a math.ceil(a) math.ceil math ceil a times = [] times [] for j in logs:
        times.append(math.floor(i/a))
     j logs times.append(math.floor(i/a)) times.append times append math.floor(i/a) math.floor math floor i/a i a if sum(times) > K:
        print(math.ceil(b))   
    else:
        print(math.ceil(a))  sum(times) > K sum(times) sum times K print(math.ceil(b)) print math.ceil(b) math.ceil math ceil b print(math.ceil(a)) print math.ceil(a) math.ceil math ceil a a = c c a N, K = map(int,input().split()) map(int,input().split()) N count +=1 1 count b = max(logs) max(logs) b times = [] [] times a = math.ceil(a) math.ceil(a) a a = 0 0 a c = (a+b)/2 (a+b)/2 c flg+=1 1 flg b = c c b logs = list(map(int,input().split())) list(map(int,input().split())) logs flg =0 0 flg times = [] [] times K = map(int,input().split()) map(int,input().split()) K b_memo = set() set() b_memo count=0 0 count
import math
N, K = map(int,input().split())
logs = list(map(int,input().split()))
a = 0
b = max(logs)
b_memo = set()
count=0
flg =0
while math.ceil(a) != math.ceil(b):
    c = (a+b)/2
    times = []
    for i in logs:
        times.append(math.floor(i/c))
    if sum(times) > K:
        a = c
    else:
        b = c
    if b - a < 0.001:
        count +=1
    if count >20:
        flg+=1
        break
if flg == 0:         
    print(math.ceil(b))
else:
    a = math.ceil(a)
    times = []
    for j in logs:
        times.append(math.floor(i/a))
    if sum(times) > K:
        print(math.ceil(b))   
    else:
        print(math.ceil(a)) 