import math
n,k=map(int,input().split())
a=list(map(int,input().split()))
x0=0
x1=10**9
while(1):
    sum=0
    mid=(x0+x1)//2
    for i in range(n):
        sum+=math.ceil(a[i]/mid)-1
    if(sum<=k):
        x1=mid
    if(sum>k):
        x0=mid
    if(x0+1==x1):
        print(x1)
        break import math math 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 x0=0 x0 0 x1=10**9 x1 10**9 10 9 while(1):
    sum=0
    mid=(x0+x1)//2
    for i in range(n):
        sum+=math.ceil(a[i]/mid)-1
    if(sum<=k):
        x1=mid
    if(sum>k):
        x0=mid
    if(x0+1==x1):
        print(x1)
        break 1 sum=0 sum 0 mid=(x0+x1)//2 mid (x0+x1)//2 x0+x1 x0 x1 2 for i in range(n):
        sum+=math.ceil(a[i]/mid)-1
     i range(n) range n sum+=math.ceil(a[i]/mid)-1 sum math.ceil(a[i]/mid)-1 math.ceil(a[i]/mid) math.ceil math ceil a[i]/mid a[i] a i mid 1 if(sum<=k):
        x1=mid
     sum<=k sum k x1=mid x1 mid if(sum>k):
        x0=mid
     sum>k sum k x0=mid x0 mid if(x0+1==x1):
        print(x1)
        break x0+1==x1 x0+1 x0 1 x1 print(x1) print x1 break k=map(int,input().split()) map(int,input().split()) k a=list(map(int,input().split())) list(map(int,input().split())) a x0=0 0 x0 sum=0 0 sum sum+=math.ceil(a[i]/mid)-1 math.ceil(a[i]/mid)-1 sum x0=mid mid x0 mid=(x0+x1)//2 (x0+x1)//2 mid x1=10**9 10**9 x1 x1=mid mid x1 n,k=map(int,input().split()) map(int,input().split()) n
import math
n,k=map(int,input().split())
a=list(map(int,input().split()))
x0=0
x1=10**9
while(1):
    sum=0
    mid=(x0+x1)//2
    for i in range(n):
        sum+=math.ceil(a[i]/mid)-1
    if(sum<=k):
        x1=mid
    if(sum>k):
        x0=mid
    if(x0+1==x1):
        print(x1)
        break