n,k = gets.chomp.split(" ").map(&:to_i)
a = gets.chomp.split(" ").map(&:to_i)
if k == 0
  puts a.max
  exit
end
left = 0
right = a.max
ans = 0
while right - left > 1
  mid = left + (right - left) / 2
  cnt = 0
  a.each do |x|
    cnt += (x-1) / mid
  end
  if cnt <= k
    right = mid
  else
    left = mid
  end
end
puts right