#include #include #include using namespace std; int main() { int n, c[100]; scanf("%d", &n); int sum = 0; for (int i = 0; i < n; i++) { scanf("%d", &c[i]); sum += c[i]; } sum = sum / 10; int count = 0; for (int i = 0; i < n; i++) { if (sum >= c[i]) { count++; } } cout << count * 30 << endl; return 0; }