n = gets.to_i c = gets.chomp.split(" ").map(&:to_f) sum = 0 c.each{|v| sum += v } count = 0 c.each{|v| if v <= sum / 10 count += 1 end } puts 30 * count