from math import *

def trycut(val):
	ret = 0
	for i in range(n):
		ret += ceil(a[i]/val)-1
	return ret 

n,k=map(int,input().split())
a = [int(i) for i in input().split()]

low = 0
high = 1000000000
ans  =-1

while low <= high:
	mid = (low + high)/2
	cut = trycut(mid)
	# ~ print("low=",low, "high=", high,"val = ",mid,"ret = ",cut)
	if cut <= k:
		high = mid-0.0000001
		ans = mid
	else:
		low =  mid+0.0000001
	# ~ if low < high: print(low, high, "je reviens")
ans = int(ans*1000000)/1000000
# ~ print(ans)
print(int(ceil(ans)))

 from math import * def trycut(val):
	ret = 0
	for i in range(n):
		ret += ceil(a[i]/val)-1
	return ret  trycut ret = 0 ret 0 for i in range(n):
		ret += ceil(a[i]/val)-1
	 i range(n) range n ret += ceil(a[i]/val)-1 ret ceil(a[i]/val)-1 ceil(a[i]/val) ceil a[i]/val a[i] a i val 1 return ret ret val val n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a = [int(i) for i in input().split()] a [int(i) for i in input().split()] low = 0 low 0 high = 1000000000 high 1000000000 ans  =-1 ans -1 while low <= high:
	mid = (low + high)/2
	cut = trycut(mid)
	# ~ print("low=",low, "high=", high,"val = ",mid,"ret = ",cut)
	if cut <= k:
		high = mid-0.0000001
		ans = mid
	else:
		low =  mid+0.0000001
	# ~ if low < high: print(low, high, "je reviens") low <= high low high mid = (low + high)/2 mid (low + high)/2 low + high low high 2 cut = trycut(mid) cut trycut(mid) trycut mid if cut <= k:
		high = mid-0.0000001
		ans = mid
	else:
		low =  mid+0.0000001
	# ~ if low < high: print(low, high, "je reviens") cut <= k cut k high = mid-0.0000001 high mid-0.0000001 mid 0.0000001 ans = mid ans mid low =  mid+0.0000001 low mid+0.0000001 mid 0.0000001 ans = int(ans*1000000)/1000000 ans int(ans*1000000)/1000000 int(ans*1000000) int ans*1000000 ans 1000000 1000000 print(int(ceil(ans))) print int(ceil(ans)) int ceil(ans) ceil ans cut = trycut(mid) trycut(mid) cut ans  =-1 -1 ans high = 1000000000 1000000000 high def trycut(val):
	ret = 0
	for i in range(n):
		ret += ceil(a[i]/val)-1
	return ret  def trycut(val):
	ret = 0
	for i in range(n):
		ret += ceil(a[i]/val)-1
	return ret  trycut mid = (low + high)/2 (low + high)/2 mid n,k=map(int,input().split()) map(int,input().split()) n a = [int(i) for i in input().split()] [int(i) for i in input().split()] a low =  mid+0.0000001 mid+0.0000001 low ans = int(ans*1000000)/1000000 int(ans*1000000)/1000000 ans low = 0 0 low high = mid-0.0000001 mid-0.0000001 high ans = mid mid ans k=map(int,input().split()) map(int,input().split()) k
from math import *

def trycut(val):
	ret = 0
	for i in range(n):
		ret += ceil(a[i]/val)-1
	return ret 

n,k=map(int,input().split())
a = [int(i) for i in input().split()]

low = 0
high = 1000000000
ans  =-1

while low <= high:
	mid = (low + high)/2
	cut = trycut(mid)
	# ~ print("low=",low, "high=", high,"val = ",mid,"ret = ",cut)
	if cut <= k:
		high = mid-0.0000001
		ans = mid
	else:
		low =  mid+0.0000001
	# ~ if low < high: print(low, high, "je reviens")
ans = int(ans*1000000)/1000000
# ~ print(ans)
print(int(ceil(ans)))


