using System; using System.Linq; public class P0191 { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var c = Console.ReadLine().Trim().Split(' ').Select(int.Parse).ToList(); var summary = c.Sum(); Console.WriteLine(c.Where(i => i * 10 <= summary).Count() * 30); } }