#include #define DEPOSIT 30 int main(void) { int n; int c[100] = {0}; int total = 0; int count = 0; int i; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &c[i]); total += c[i]; } for (i = 0; i < n; i++) if (c[i] * 10 <= total) count++; printf("%d\n", count * DEPOSIT); return 0; }