L=gets.to_i N=gets.to_i Ws= gets.split.map(&:to_i).sort count=0 N.times do |n| if count+n