N, K = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
sum = A.sum
#warn sum
ave = Rational(sum, K + N)
D = A.map{|i|[(i / ave).to_i, 1].max}
#warn D.inspect
k = K + N
D.each{|d|
    k -= d
}
#warn k
R = A.zip(D)
R.sort_by!{|i|-Rational(i[0], i[1])}
#warn R.inspect
puts Rational(*R[k]).ceil
