END { load __FILE__ unless $stdin.eof? }

n, k = gets.split.map!(&:to_i)
a    = gets.split.map!(&:to_i).sort!

best = a.sum(0.0) / (n + k)
kmax = a.sum { |ai| (ai / best).to_i }

if k >= kmax
  a.map! { |a| r = (ai / best).to_i; k -= r; [a.quo(r + 1), r + 1] }.sort!
else
  a.sort!.map! { |a| [a.quo(1), 1] }
end

k.times do
  x, y = a.pop
  x = x * y / (y + 1)
  y = y + 1
  i = a.bsearch_index { |xi, yi| xi >= x } || n - 1
  a.insert(i, [x, y])
end

puts a.pop[0].ceil
