n = gets.to_i cs = gets.split.map(&:to_i) a = cs.inject(:+) / 10.0 puts cs.select { |c| c <= a }.count * 30