n,k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
lower = 0
upper = 10**9
while upper.ceil != lower.ceil
  mid = (upper+lower).to_f/2
  x = 0
  a.each do |i|
    x += ((i.to_f / mid)-1).ceil
  end
  if x <= k
    upper = mid
  else
    lower = mid
  end
end

puts upper.ceil