from math import ceil
N,K = map(int,input().split())
A = list(map(int,input().split()))

def is_ok(X):
    #最大値をX以下にできるか
    cnt = 0
    for a in A:
        cnt += ceil(a/X)-1
    return cnt <= K

def bisearch(high,low):
    while high - low > 1:
        mid = (high+low)//2
        if is_ok(mid):
            high = mid
        else:
            low = mid
    return high

print(bisearch(10**9+1,0)) from math import ceil 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 is_ok(X):
    #最大値をX以下にできるか
    cnt = 0
    for a in A:
        cnt += ceil(a/X)-1
    return cnt <= K is_ok cnt = 0 cnt 0 for a in A:
        cnt += ceil(a/X)-1
     a A cnt += ceil(a/X)-1 cnt ceil(a/X)-1 ceil(a/X) ceil a/X a X 1 return cnt <= K cnt <= K cnt K X X def bisearch(high,low):
    while high - low > 1:
        mid = (high+low)//2
        if is_ok(mid):
            high = mid
        else:
            low = mid
    return high bisearch while high - low > 1:
        mid = (high+low)//2
        if is_ok(mid):
            high = mid
        else:
            low = mid
     high - low > 1 high - low high low 1 mid = (high+low)//2 mid (high+low)//2 high+low high low 2 if is_ok(mid):
            high = mid
        else:
            low = mid
     is_ok(mid) is_ok mid high = mid high mid low = mid low mid return high high high high low low print(bisearch(10**9+1,0)) print bisearch(10**9+1,0) bisearch 10**9+1 10**9 10 9 1 0 def bisearch(high,low):
    while high - low > 1:
        mid = (high+low)//2
        if is_ok(mid):
            high = mid
        else:
            low = mid
    return high def bisearch(high,low):
    while high - low > 1:
        mid = (high+low)//2
        if is_ok(mid):
            high = mid
        else:
            low = mid
    return high bisearch N,K = map(int,input().split()) map(int,input().split()) N def is_ok(X):
    #最大値をX以下にできるか
    cnt = 0
    for a in A:
        cnt += ceil(a/X)-1
    return cnt <= K def is_ok(X):
    #最大値をX以下にできるか
    cnt = 0
    for a in A:
        cnt += ceil(a/X)-1
    return cnt <= K is_ok K = map(int,input().split()) map(int,input().split()) K A = list(map(int,input().split())) list(map(int,input().split())) A
from math import ceil
N,K = map(int,input().split())
A = list(map(int,input().split()))

def is_ok(X):
    #最大値をX以下にできるか
    cnt = 0
    for a in A:
        cnt += ceil(a/X)-1
    return cnt <= K

def bisearch(high,low):
    while high - low > 1:
        mid = (high+low)//2
        if is_ok(mid):
            high = mid
        else:
            low = mid
    return high

print(bisearch(10**9+1,0))