import math

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

r = 0
l = 1e9

test_count = 0

while (l - r > 1) :
    target_log_len = (r + l) // 2
    cut_count = 0

    for log_len in A:
        cut_count += (log_len - 1) // target_log_len

    if cut_count <= K:
        l = target_log_len
    else:
        r = target_log_len

    test_count += 1
    if test_count > 100:
        break

print(int(l)) import math math N, K = list(map(int, input().split())) N list(map(int, input().split())) list 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 r = 0 r 0 l = 1e9 l 1e9 test_count = 0 test_count 0 while (l - r > 1) :
    target_log_len = (r + l) // 2
    cut_count = 0

    for log_len in A:
        cut_count += (log_len - 1) // target_log_len

    if cut_count <= K:
        l = target_log_len
    else:
        r = target_log_len

    test_count += 1
    if test_count > 100:
        break l - r > 1 l - r l r 1 target_log_len = (r + l) // 2 target_log_len (r + l) // 2 r + l r l 2 cut_count = 0 cut_count 0 for log_len in A:
        cut_count += (log_len - 1) // target_log_len

     log_len A cut_count += (log_len - 1) // target_log_len cut_count (log_len - 1) // target_log_len log_len - 1 log_len 1 target_log_len if cut_count <= K:
        l = target_log_len
    else:
        r = target_log_len

     cut_count <= K cut_count K l = target_log_len l target_log_len r = target_log_len r target_log_len test_count += 1 test_count 1 if test_count > 100:
        break test_count > 100 test_count 100 break print(int(l)) print int(l) int l K = list(map(int, input().split())) list(map(int, input().split())) K l = target_log_len target_log_len l test_count = 0 0 test_count test_count += 1 1 test_count cut_count += (log_len - 1) // target_log_len (log_len - 1) // target_log_len cut_count l = 1e9 1e9 l r = target_log_len target_log_len r cut_count = 0 0 cut_count N, K = list(map(int, input().split())) list(map(int, input().split())) N A = list(map(int, input().split())) list(map(int, input().split())) A r = 0 0 r target_log_len = (r + l) // 2 (r + l) // 2 target_log_len
import math

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

r = 0
l = 1e9

test_count = 0

while (l - r > 1) :
    target_log_len = (r + l) // 2
    cut_count = 0

    for log_len in A:
        cut_count += (log_len - 1) // target_log_len

    if cut_count <= K:
        l = target_log_len
    else:
        r = target_log_len

    test_count += 1
    if test_count > 100:
        break

print(int(l))