from math import ceil

def BinarySearch(x):
    ans = sum([ceil(a/x)-1 for a in A])
    if ans <= K:
        return True
    else:
        return False

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

r = max(A)
l = 0
eps = 10**-6

while abs(r-l) > eps:

    m = (r+l)/2

    if BinarySearch(m):
        r = m
    else:
        l = m

print(ceil(r))  from math import ceil def BinarySearch(x):
    ans = sum([ceil(a/x)-1 for a in A])
    if ans <= K:
        return True
    else:
        return False BinarySearch ceil(a/x)-1 for a in A for a in A a A for a in A ceil(a/x)-1 ceil(a/x) ceil a/x a x 1 ans = sum([ceil(a/x)-1 for a in A]) ans sum([ceil(a/x)-1 for a in A]) sum [ceil(a/x)-1 for a in A] if ans <= K:
        return True
    else:
        return False ans <= K ans K return True True return False False 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 r = max(A) r max(A) max A l = 0 l 0 eps = 10**-6 eps 10**-6 10 -6 while abs(r-l) > eps:

    m = (r+l)/2

    if BinarySearch(m):
        r = m
    else:
        l = m abs(r-l) > eps abs(r-l) abs r-l r l eps m = (r+l)/2 m (r+l)/2 r+l r l 2 if BinarySearch(m):
        r = m
    else:
        l = m BinarySearch(m) BinarySearch m r = m r m l = m l m print(ceil(r)) print ceil(r) ceil r A = list(map(int,input().split())) list(map(int,input().split())) A m = (r+l)/2 (r+l)/2 m K = map(int,input().split()) map(int,input().split()) K def BinarySearch(x):
    ans = sum([ceil(a/x)-1 for a in A])
    if ans <= K:
        return True
    else:
        return False def BinarySearch(x):
    ans = sum([ceil(a/x)-1 for a in A])
    if ans <= K:
        return True
    else:
        return False BinarySearch eps = 10**-6 10**-6 eps l = m m l l = 0 0 l r = max(A) max(A) r N,K = map(int,input().split()) map(int,input().split()) N r = m m r
from math import ceil

def BinarySearch(x):
    ans = sum([ceil(a/x)-1 for a in A])
    if ans <= K:
        return True
    else:
        return False

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

r = max(A)
l = 0
eps = 10**-6

while abs(r-l) > eps:

    m = (r+l)/2

    if BinarySearch(m):
        r = m
    else:
        l = m

print(ceil(r)) 
