using System; namespace yukicoder { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var str = Console.ReadLine().Split(" "); int[] strings = new int[N]; int sum = 0 , f = 0 , anscount = 0; for (int i = 0; i < N; i++) { strings[i] = int.Parse(str[i]); sum += strings[i]; } f = sum / 10; for (int j = 0; j < N; j++) { if (strings[j] <= f) { anscount += 30; } } Console.WriteLine(anscount); } } }