import sys
import  math
import fractions
from collections import defaultdict
import heapq
from bisect import bisect_left,bisect

stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K=nm()
A=nl()
l=0
r=10**9
mid=0

if(K==0):
    print(max(A))
    sys.exit(0)

while(l+1<r):
    mid=(l+r)//2
    tmp=0
    for i in range(len(A)):
        if((A[i])%mid==0):
           tmp+=((A[i])//mid)-1
        else:
           tmp+=((A[i])//mid)
    if(tmp<=K):
        r=mid
    else:
        l=mid

print(r) import sys sys import  math math import fractions fractions from collections import defaultdict import heapq heapq from bisect import bisect_left,bisect stdin = sys.stdin stdin sys.stdin sys stdin ns = lambda: stdin.readline().rstrip() ns lambda: stdin.readline().rstrip() stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip ni = lambda: int(stdin.readline().rstrip()) ni lambda: int(stdin.readline().rstrip()) int(stdin.readline().rstrip()) int stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip nm = lambda: map(int, stdin.readline().split()) nm lambda: map(int, stdin.readline().split()) map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split nl = lambda: list(map(int, stdin.readline().split())) nl lambda: list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split N,K=nm() N nm() nm K A=nl() A nl() nl l=0 l 0 r=10**9 r 10**9 10 9 mid=0 mid 0 if(K==0):
    print(max(A))
    sys.exit(0) K==0 K 0 print(max(A)) print max(A) max A sys.exit(0) sys.exit sys exit 0 while(l+1<r):
    mid=(l+r)//2
    tmp=0
    for i in range(len(A)):
        if((A[i])%mid==0):
           tmp+=((A[i])//mid)-1
        else:
           tmp+=((A[i])//mid)
    if(tmp<=K):
        r=mid
    else:
        l=mid l+1<r l+1 l 1 r mid=(l+r)//2 mid (l+r)//2 l+r l r 2 tmp=0 tmp 0 for i in range(len(A)):
        if((A[i])%mid==0):
           tmp+=((A[i])//mid)-1
        else:
           tmp+=((A[i])//mid)
     i range(len(A)) range len(A) len A if((A[i])%mid==0):
           tmp+=((A[i])//mid)-1
        else:
           tmp+=((A[i])//mid)
     (A[i])%mid==0 (A[i])%mid A[i] A i mid 0 tmp+=((A[i])//mid)-1 tmp ((A[i])//mid)-1 (A[i])//mid A[i] A i mid 1 tmp+=((A[i])//mid) tmp (A[i])//mid A[i] A i mid if(tmp<=K):
        r=mid
    else:
        l=mid tmp<=K tmp K r=mid r mid l=mid l mid print(r) print r stdin = sys.stdin sys.stdin stdin r=10**9 10**9 r tmp+=((A[i])//mid)-1 ((A[i])//mid)-1 tmp A=nl() nl() A l=0 0 l N,K=nm() nm() N mid=(l+r)//2 (l+r)//2 mid nm = lambda: map(int, stdin.readline().split()) lambda: map(int, stdin.readline().split()) nm l=mid mid l r=mid mid r tmp+=((A[i])//mid) (A[i])//mid tmp ni = lambda: int(stdin.readline().rstrip()) lambda: int(stdin.readline().rstrip()) ni ns = lambda: stdin.readline().rstrip() lambda: stdin.readline().rstrip() ns K=nm() nm() K mid=0 0 mid nl = lambda: list(map(int, stdin.readline().split())) lambda: list(map(int, stdin.readline().split())) nl tmp=0 0 tmp
import sys
import  math
import fractions
from collections import defaultdict
import heapq
from bisect import bisect_left,bisect

stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K=nm()
A=nl()
l=0
r=10**9
mid=0

if(K==0):
    print(max(A))
    sys.exit(0)

while(l+1<r):
    mid=(l+r)//2
    tmp=0
    for i in range(len(A)):
        if((A[i])%mid==0):
           tmp+=((A[i])//mid)-1
        else:
           tmp+=((A[i])//mid)
    if(tmp<=K):
        r=mid
    else:
        l=mid

print(r)