n,k = gets.chomp.split(" ").map(&:to_i)
a_arr = gets.chomp.split(" ").map(&:to_i)

l = 0
r = a_arr.max

# 二分探索
while true do
  len = (r + l) / 2

  tmp_k = 0
  a_arr.each do |a|
    tmp_k += (a / len.to_f).ceil - 1
  end

  if tmp_k <= k
    r = len
  else
    l = len
  end

  if r - l <= 1
    break
  end
end

puts l + 1
