ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n,k = ma()
A = list(ma())
A.sort(reverse=True)
if k==0:
    print(A[0])
    exit()

def isok(x):
    cnt=0
    for a in A:
        cnt+= (a-1)//x
    #print(cnt,x)
    return cnt>k
def bisect():
    ok = 0
    ng = 10**9+1
    x = (ok+ng)//2
    while ng-ok>1:
        if isok(x):
            ok = x
        else:
            ng=x
        x = (ok+ng)//2
    return ng
print(bisect()) ma = lambda :map(int,input().split()) ma lambda :map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split lma = lambda :list(map(int,input().split())) lma lambda :list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ni = lambda:int(input()) ni lambda:int(input()) int(input()) int input() input yn = lambda fl:print("Yes") if fl else print("No") yn lambda fl:print("Yes") if fl else print("No") print("Yes") if fl else print("No") fl print("Yes") print "Yes" print("No") print "No" fl import collections collections import math math import itertools itertools import heapq as hq heapq n,k = ma() n ma() ma k A = list(ma()) A list(ma()) list ma() ma A.sort(reverse=True) A.sort A sort reverse=True reverse True if k==0:
    print(A[0])
    exit() k==0 k 0 print(A[0]) print A[0] A 0 exit() exit def isok(x):
    cnt=0
    for a in A:
        cnt+= (a-1)//x
    #print(cnt,x)
    return cnt>k isok cnt=0 cnt 0 for a in A:
        cnt+= (a-1)//x
    #print(cnt,x)
     a A cnt+= (a-1)//x cnt (a-1)//x a-1 a 1 x return cnt>k cnt>k cnt k x x def bisect():
    ok = 0
    ng = 10**9+1
    x = (ok+ng)//2
    while ng-ok>1:
        if isok(x):
            ok = x
        else:
            ng=x
        x = (ok+ng)//2
    return ng bisect ok = 0 ok 0 ng = 10**9+1 ng 10**9+1 10**9 10 9 1 x = (ok+ng)//2 x (ok+ng)//2 ok+ng ok ng 2 while ng-ok>1:
        if isok(x):
            ok = x
        else:
            ng=x
        x = (ok+ng)//2
     ng-ok>1 ng-ok ng ok 1 if isok(x):
            ok = x
        else:
            ng=x
         isok(x) isok x ok = x ok x ng=x ng x x = (ok+ng)//2 x (ok+ng)//2 ok+ng ok ng 2 return ng ng print(bisect()) print bisect() bisect ni = lambda:int(input()) lambda:int(input()) ni A = list(ma()) list(ma()) A def bisect():
    ok = 0
    ng = 10**9+1
    x = (ok+ng)//2
    while ng-ok>1:
        if isok(x):
            ok = x
        else:
            ng=x
        x = (ok+ng)//2
    return ng def bisect():
    ok = 0
    ng = 10**9+1
    x = (ok+ng)//2
    while ng-ok>1:
        if isok(x):
            ok = x
        else:
            ng=x
        x = (ok+ng)//2
    return ng bisect yn = lambda fl:print("Yes") if fl else print("No") lambda fl:print("Yes") if fl else print("No") yn lma = lambda :list(map(int,input().split())) lambda :list(map(int,input().split())) lma def isok(x):
    cnt=0
    for a in A:
        cnt+= (a-1)//x
    #print(cnt,x)
    return cnt>k def isok(x):
    cnt=0
    for a in A:
        cnt+= (a-1)//x
    #print(cnt,x)
    return cnt>k isok k = ma() ma() k ma = lambda :map(int,input().split()) lambda :map(int,input().split()) ma n,k = ma() ma() n
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n,k = ma()
A = list(ma())
A.sort(reverse=True)
if k==0:
    print(A[0])
    exit()

def isok(x):
    cnt=0
    for a in A:
        cnt+= (a-1)//x
    #print(cnt,x)
    return cnt>k
def bisect():
    ok = 0
    ng = 10**9+1
    x = (ok+ng)//2
    while ng-ok>1:
        if isok(x):
            ok = x
        else:
            ng=x
        x = (ok+ng)//2
    return ng
print(bisect())
