def f(x):
    now = 0
    for i in range(n):
        now += (a[i]-1)//x

    return now <= k

n, k = map(int, input().split())
a = list(map(int, input().split()))
ng = 0
ok= int(1e9)
while ok - ng > 1:
    x = (ok + ng) // 2
    if f(x):
        ok = x
    else:
        ng = x

print(ok) def f(x):
    now = 0
    for i in range(n):
        now += (a[i]-1)//x

    return now <= k f now = 0 now 0 for i in range(n):
        now += (a[i]-1)//x

     i range(n) range n now += (a[i]-1)//x now (a[i]-1)//x a[i]-1 a[i] a i 1 x return now <= k now <= k now k x x 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 ng = 0 ng 0 ok= int(1e9) ok int(1e9) int 1e9 while ok - ng > 1:
    x = (ok + ng) // 2
    if f(x):
        ok = x
    else:
        ng = x ok - ng > 1 ok - ng ok ng 1 x = (ok + ng) // 2 x (ok + ng) // 2 ok + ng ok ng 2 if f(x):
        ok = x
    else:
        ng = x f(x) f x ok = x ok x ng = x ng x print(ok) print ok ok = x x ok def f(x):
    now = 0
    for i in range(n):
        now += (a[i]-1)//x

    return now <= k def f(x):
    now = 0
    for i in range(n):
        now += (a[i]-1)//x

    return now <= k f k = map(int, input().split()) map(int, input().split()) k a = list(map(int, input().split())) list(map(int, input().split())) a n, k = map(int, input().split()) map(int, input().split()) n ng = 0 0 ng ng = x x ng ok= int(1e9) int(1e9) ok x = (ok + ng) // 2 (ok + ng) // 2 x
def f(x):
    now = 0
    for i in range(n):
        now += (a[i]-1)//x

    return now <= k

n, k = map(int, input().split())
a = list(map(int, input().split()))
ng = 0
ok= int(1e9)
while ok - ng > 1:
    x = (ok + ng) // 2
    if f(x):
        ok = x
    else:
        ng = x

print(ok)