n, k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
b = []
applied = Array.new(n, 1)
a.each{|ai| b << ai }
while k>0
  i = b.index(b.max)
  ti = (k-1)/n+1
  k -= ti
  applied[i] += ti
  b[i] = (a[i]-1) / applied[i] + 1
end
p b.max
