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)):
        tmp+=((A[i]-1)//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)):
        tmp+=((A[i]-1)//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)):
        tmp+=((A[i]-1)//mid)
     i range(len(A)) range len(A) len A tmp+=((A[i]-1)//mid) tmp (A[i]-1)//mid A[i]-1 A[i] A i 1 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 nl = lambda: list(map(int, stdin.readline().split())) lambda: list(map(int, stdin.readline().split())) nl K=nm() nm() K l=mid mid l N,K=nm() nm() N mid=0 0 mid ni = lambda: int(stdin.readline().rstrip()) lambda: int(stdin.readline().rstrip()) ni r=mid mid r nm = lambda: map(int, stdin.readline().split()) lambda: map(int, stdin.readline().split()) nm ns = lambda: stdin.readline().rstrip() lambda: stdin.readline().rstrip() ns tmp=0 0 tmp stdin = sys.stdin sys.stdin stdin tmp+=((A[i]-1)//mid) (A[i]-1)//mid tmp l=0 0 l A=nl() nl() A mid=(l+r)//2 (l+r)//2 mid r=10**9 10**9 r
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)):
        tmp+=((A[i]-1)//mid)
    if(tmp<=K):
        r=mid
    else:
        l=mid

print(r)