n, k = gets.chomp.split.map(&:to_i)
arr = gets.chomp.split.map(&:to_f)

def check(k, len, arr)
	cnt = 0
	arr.each do |a|
		cnt += (a/len).ceil - 1
	end
	return cnt <= k
end

prev = -1
l = 0
r = arr.max.to_i + 1
min = 1145148101919
while l < r
	len = (l + r) / 2
	ok = check(k, len, arr)
	
	#puts "len:#{len} ok:#{ok} l:#{l} r:#{r}"
	if len == prev 
		break
	elsif ok 
		r = len 
		min = len if min > len
	else
		l = len
	end
	prev = len
end

puts min