using System; namespace yukicoder { class Program { static void Main(string[] args) { int a = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int sum = 0; int c = 0; int ans = 0; for(int i = 0; i < a; i++) { int b = int.Parse(s[i]); sum += b; } c = sum / 10; for(int j = 0; j < a; j++) { int e= int.Parse(s[j]); if (e<=c) { ans += 30; } } Console.WriteLine(ans); } } }