n, k = gets.chomp.split.map(&:to_i)
a = gets.chomp.split.map(&:to_i)
hs = Hash.new(0)

while k > 0
  a.sort_by! {|x| x / (hs[x] + 1) }
  hs[a[-1]] += 1
  k -= 1
end

puts a.map {|x| (x + hs[x]) / (hs[x] + 1) }.max