import math

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

def binary_search(ng=0, ok=max(a)):
    if ok - ng < 2: return ok
    mid = (ok + ng) // 2
    cnt = 0
    for i in a:
        cnt += math.ceil(i / mid) - 1
    if cnt <= k:
        return binary_search(ng, mid)
    else:
        return binary_search(mid, ok)
print(binary_search()) import math math 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 def binary_search(ng=0, ok=max(a)):
    if ok - ng < 2: return ok
    mid = (ok + ng) // 2
    cnt = 0
    for i in a:
        cnt += math.ceil(i / mid) - 1
    if cnt <= k:
        return binary_search(ng, mid)
    else:
        return binary_search(mid, ok) binary_search if ok - ng < 2: return ok
     ok - ng < 2 ok - ng ok ng 2 mid = (ok + ng) // 2 mid (ok + ng) // 2 ok + ng ok ng 2 cnt = 0 cnt 0 for i in a:
        cnt += math.ceil(i / mid) - 1
     i a cnt += math.ceil(i / mid) - 1 cnt math.ceil(i / mid) - 1 math.ceil(i / mid) math.ceil math ceil i / mid i mid 1 if cnt <= k:
        return binary_search(ng, mid)
    else:
        return binary_search(mid, ok) cnt <= k cnt k return binary_search(ng, mid) binary_search(ng, mid) binary_search ng mid return binary_search(mid, ok) binary_search(mid, ok) binary_search mid ok ng=0 ng 0 ok=max(a) ok max(a) max a print(binary_search()) print binary_search() binary_search n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k def binary_search(ng=0, ok=max(a)):
    if ok - ng < 2: return ok
    mid = (ok + ng) // 2
    cnt = 0
    for i in a:
        cnt += math.ceil(i / mid) - 1
    if cnt <= k:
        return binary_search(ng, mid)
    else:
        return binary_search(mid, ok) def binary_search(ng=0, ok=max(a)):
    if ok - ng < 2: return ok
    mid = (ok + ng) // 2
    cnt = 0
    for i in a:
        cnt += math.ceil(i / mid) - 1
    if cnt <= k:
        return binary_search(ng, mid)
    else:
        return binary_search(mid, ok) binary_search a = list(map(int, input().split())) list(map(int, input().split())) a
import math

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

def binary_search(ng=0, ok=max(a)):
    if ok - ng < 2: return ok
    mid = (ok + ng) // 2
    cnt = 0
    for i in a:
        cnt += math.ceil(i / mid) - 1
    if cnt <= k:
        return binary_search(ng, mid)
    else:
        return binary_search(mid, ok)
print(binary_search())