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

Max = max(log_ls)

def less_k(min_length,log_ls = log_ls,K=K):
    times = 0
    for log in log_ls:
        if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
    if times <= K:
        return True
    else:
        return False
#print(less_k(5,[10,10],2))

def return_min_length():
    r = Max
    l = -1
    while True:
        next_length = (r+l) // 2
        if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
        if r - l == 1:
            return r

ans = return_min_length()
print(ans) N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K log_ls = list(map(int,input().split())) log_ls list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split Max = max(log_ls) Max max(log_ls) max log_ls def less_k(min_length,log_ls = log_ls,K=K):
    times = 0
    for log in log_ls:
        if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
    if times <= K:
        return True
    else:
        return False
#print(less_k(5,[10,10],2)) less_k times = 0 times 0 for log in log_ls:
        if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
     log log_ls if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
     log % min_length == 0 log % min_length log min_length 0 times += log // min_length -1 times log // min_length -1 log // min_length log min_length 1 times += log // min_length times log // min_length log min_length if times <= K:
        return True
    else:
        return False
#print(less_k(5,[10,10],2)) times <= K times K return True True return False False min_length min_length log_ls = log_ls log_ls log_ls K=K K K def return_min_length():
    r = Max
    l = -1
    while True:
        next_length = (r+l) // 2
        if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
        if r - l == 1:
            return r return_min_length r = Max r Max l = -1 l -1 while True:
        next_length = (r+l) // 2
        if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
        if r - l == 1:
            return r True next_length = (r+l) // 2 next_length (r+l) // 2 r+l r l 2 if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
         next_length == 0 or not less_k(next_length) next_length == 0 next_length 0 not less_k(next_length) less_k(next_length) less_k next_length l = next_length l next_length r = next_length r next_length if r - l == 1:
            return r r - l == 1 r - l r l 1 return r r ans = return_min_length() ans return_min_length() return_min_length print(ans) print ans ans = return_min_length() return_min_length() ans N,K = map(int,input().split()) map(int,input().split()) N def return_min_length():
    r = Max
    l = -1
    while True:
        next_length = (r+l) // 2
        if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
        if r - l == 1:
            return r def return_min_length():
    r = Max
    l = -1
    while True:
        next_length = (r+l) // 2
        if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
        if r - l == 1:
            return r return_min_length Max = max(log_ls) max(log_ls) Max def less_k(min_length,log_ls = log_ls,K=K):
    times = 0
    for log in log_ls:
        if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
    if times <= K:
        return True
    else:
        return False
#print(less_k(5,[10,10],2)) def less_k(min_length,log_ls = log_ls,K=K):
    times = 0
    for log in log_ls:
        if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
    if times <= K:
        return True
    else:
        return False
#print(less_k(5,[10,10],2)) less_k K = map(int,input().split()) map(int,input().split()) K log_ls = list(map(int,input().split())) list(map(int,input().split())) log_ls
N,K = map(int,input().split())
log_ls = list(map(int,input().split()))

Max = max(log_ls)

def less_k(min_length,log_ls = log_ls,K=K):
    times = 0
    for log in log_ls:
        if log % min_length == 0:
            times += log // min_length -1
        else:
            times += log // min_length
    if times <= K:
        return True
    else:
        return False
#print(less_k(5,[10,10],2))

def return_min_length():
    r = Max
    l = -1
    while True:
        next_length = (r+l) // 2
        if next_length == 0 or not less_k(next_length):
            l = next_length
        else:
            r = next_length
        if r - l == 1:
            return r

ans = return_min_length()
print(ans)
