N, K = gets.chomp.split.map(&:to_i)
AS = gets.chomp.split.map(&:to_i)

as_sum = AS.sum
num = N + K 
num_cut_float = AS.map { |a| 1.0 * num * a / as_sum }
                  .map { |a| a < 1 ? 1 : a}
num_cut_int = num_cut_float.map(&:to_i)

as_length = []
AS.size.times do |i|
  as_length << (1.0 * AS[i] / num_cut_int[i]).ceil 
end
as_length = as_length.sort.reverse
puts as_length[N + K - num_cut_int.sum]

