from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from bisect import bisect_left,bisect_right
from math import sqrt,gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint
from statistics import mean,median,mode
import sys
sys.setrecursionlimit(10 ** 6)

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] )

def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] )

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float())

n,k = MI()
a = RI()

L = max(a)

def mycheck(l):
    count = 0
    for i in range(n):
        count += a[i]//l
    return count <= k

lb = 0
ub = L
for i in range(100):
    # print(ub,lb)
    mid = (lb+ub)/2
    # print(mid)
    flag = mycheck(mid)
    # print(flag)
    if flag:
        ub = mid
    else:
        lb = mid

ans = ceil(lb)
print(ans) from collections import deque,defaultdict,Counter from heapq import heapify,heappop,heappush,heappushpop from copy import copy,deepcopy from itertools import product,permutations,combinations,combinations_with_replacement from bisect import bisect_left,bisect_right from math import sqrt,gcd,ceil,floor,factorial from functools import reduce from pprint import pprint from statistics import mean,median,mode import sys sys sys.setrecursionlimit(10 ** 6) sys.setrecursionlimit sys setrecursionlimit 10 ** 6 10 6 INF = float("inf") INF float("inf") float "inf" def mycol(data,col):
    return [ row[col] for row in data ] mycol row[col] for row in data for row in data row data for row in data row[col] row col return [ row[col] for row in data ] [ row[col] for row in data ] data data col col def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data mysort data.sort(key=lambda x:x[col],reverse=revese) data.sort data sort key=lambda x:x[col] key lambda x:x[col] x[col] x col x reverse=revese reverse revese return data data data data col col reverse=False reverse False def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M mymax M = -1*float("inf") M -1*float("inf") -1 float("inf") float "inf" for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
     i range(len(data)) range len(data) len data m = max(data[i]) m max(data[i]) max data[i] data i M = max(M,m) M max(M,m) max M m return M M data data def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m mymin m = float("inf") m float("inf") float "inf" for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
     i range(len(data)) range len(data) len data M = min(data[i]) M min(data[i]) min data[i] data i m = min(m,M) m min(m,M) min m M return m m data data def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l) mycount l = bisect_left(ls,x) l bisect_left(ls,x) bisect_left ls x r = bisect_right(ls,x) r bisect_right(ls,x) bisect_right ls x return (r-l) r-l r l ls ls x x def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] ) mydictvaluesort return sorted( dictionary.items(), key=lambda x:x[1] ) sorted( dictionary.items(), key=lambda x:x[1] ) sorted dictionary.items() dictionary.items dictionary items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x dictionary dictionary def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] ) mydictkeysort return sorted( dictionary.items(), key=lambda x:x[0] ) sorted( dictionary.items(), key=lambda x:x[0] ) sorted dictionary.items() dictionary.items dictionary items key=lambda x:x[0] key lambda x:x[0] x[0] x 0 x dictionary dictionary def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error") myoutput if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error") space if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
     len(ls)==0 len(ls) len ls 0 print(" ") print " " elif type(ls[0])==str:
            print(" ".join(ls))
         type(ls[0])==str type(ls[0]) type ls[0] ls 0 str print(" ".join(ls)) print " ".join(ls) " ".join " " join ls elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
         type(ls[0])==int type(ls[0]) type ls[0] ls 0 int print(" ".join(map(str,ls))) print " ".join(map(str,ls)) " ".join " " join map(str,ls) map str ls print("Output Error") print "Output Error" if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error") len(ls)==0 len(ls) len ls 0 print("") print "" elif type(ls[0])==str:
            print("".join(ls))
         type(ls[0])==str type(ls[0]) type ls[0] ls 0 str print("".join(ls)) print "".join(ls) "".join "" join ls elif type(ls[0])==int:
            print("".join(map(str,ls)))
         type(ls[0])==int type(ls[0]) type ls[0] ls 0 int print("".join(map(str,ls))) print "".join(map(str,ls)) "".join "" join map(str,ls) map str ls print("Output Error") print "Output Error" ls ls space=True space True def I():
    return int(input()) I return int(input()) int(input()) int input() input def MI():
    return map(int,input().split()) MI return map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split def RI():
    return list(map(int,input().split())) RI return list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def CI(n):
    return [ int(input()) for _ in range(n) ] CI int(input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) int(input()) int input() input return [ int(input()) for _ in range(n) ] [ int(input()) for _ in range(n) ] n n def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ] LI list(map(int,input().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split return [ list(map(int,input().split())) for _ in range(n) ] [ list(map(int,input().split())) for _ in range(n) ] n n def S():
    return input() S return input() input() input def MS():
    return input().split() MS return input().split() input().split() ().split () input split def RS():
    return list(input()) RS return list(input()) list(input()) list input() input def CS(n):
    return [ input() for _ in range(n) ] CS input() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) input() input return [ input() for _ in range(n) ] [ input() for _ in range(n) ] n n def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float()) LS list(input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(input()) list input() input return [ list(input()) for _ in range(n) ] [ list(input()) for _ in range(n) ] n n n,k = MI() n MI() MI k a = RI() a RI() RI L = max(a) L max(a) max a def mycheck(l):
    count = 0
    for i in range(n):
        count += a[i]//l
    return count <= k mycheck count = 0 count 0 for i in range(n):
        count += a[i]//l
     i range(n) range n count += a[i]//l count a[i]//l a[i] a i l return count <= k count <= k count k l l lb = 0 lb 0 ub = L ub L for i in range(100):
    # print(ub,lb)
    mid = (lb+ub)/2
    # print(mid)
    flag = mycheck(mid)
    # print(flag)
    if flag:
        ub = mid
    else:
        lb = mid i range(100) range 100 mid = (lb+ub)/2 mid (lb+ub)/2 lb+ub lb ub 2 flag = mycheck(mid) flag mycheck(mid) mycheck mid if flag:
        ub = mid
    else:
        lb = mid flag ub = mid ub mid lb = mid lb mid ans = ceil(lb) ans ceil(lb) ceil lb print(ans) print ans def CI(n):
    return [ int(input()) for _ in range(n) ] def CI(n):
    return [ int(input()) for _ in range(n) ] CI def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] ) def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] ) mydictkeysort flag = mycheck(mid) mycheck(mid) flag ub = L L ub def S():
    return input() def S():
    return input() S def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data mysort ub = mid mid ub n,k = MI() MI() n def CS(n):
    return [ input() for _ in range(n) ] def CS(n):
    return [ input() for _ in range(n) ] CS def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l) def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l) mycount mid = (lb+ub)/2 (lb+ub)/2 mid def RI():
    return list(map(int,input().split())) def RI():
    return list(map(int,input().split())) RI def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error") def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error") myoutput lb = mid mid lb def RS():
    return list(input()) def RS():
    return list(input()) RS def I():
    return int(input()) def I():
    return int(input()) I def mycheck(l):
    count = 0
    for i in range(n):
        count += a[i]//l
    return count <= k def mycheck(l):
    count = 0
    for i in range(n):
        count += a[i]//l
    return count <= k mycheck def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] ) def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] ) mydictvaluesort ans = ceil(lb) ceil(lb) ans def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float()) def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float()) LS L = max(a) max(a) L def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M mymax lb = 0 0 lb def MS():
    return input().split() def MS():
    return input().split() MS INF = float("inf") float("inf") INF def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m mymin def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ] def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ] LI def MI():
    return map(int,input().split()) def MI():
    return map(int,input().split()) MI k = MI() MI() k def mycol(data,col):
    return [ row[col] for row in data ] def mycol(data,col):
    return [ row[col] for row in data ] mycol a = RI() RI() a
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from bisect import bisect_left,bisect_right
from math import sqrt,gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint
from statistics import mean,median,mode
import sys
sys.setrecursionlimit(10 ** 6)

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] )

def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] )

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float())

n,k = MI()
a = RI()

L = max(a)

def mycheck(l):
    count = 0
    for i in range(n):
        count += a[i]//l
    return count <= k

lb = 0
ub = L
for i in range(100):
    # print(ub,lb)
    mid = (lb+ub)/2
    # print(mid)
    flag = mycheck(mid)
    # print(flag)
    if flag:
        ub = mid
    else:
        lb = mid

ans = ceil(lb)
print(ans)