using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] c = Console.ReadLine().Split().Select(a => int.Parse(a)).ToArray(); int ans = 0; int line = c.Sum() / 10; for (int i = 0; i < n; i++) { if (c[i] <= line) { ans++; } } Console.WriteLine(ans * 30); Console.ReadLine(); } }