import math
n,k=map(int,input().split())
a=list(map(int,input().split()))

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

left=1
right=10**9
while left<right:
  cnt=0
  mid=(left+right)//2
  for i in range(n):
    cnt+=math.ceil(a[i]/mid)-1
  if cnt<=k:
    right=mid
  else:
    left=mid+1
print(left)