n, k = gets.split.map { |e| e.to_i }
a    = gets.split.map { |e| e.to_i }.sort.reverse

ans = (0.0 .. a[0]).bsearch do |t|
  
  i   = 0
  cnt = 0
  while (i < n && a[i] > t) && cnt <= k
    cnt += (a[i] / t).ceil - 1
    i += 1
  end
  
  cnt <= k
end.ceil

puts ans