#include #include #include #include #include using namespace std; int main() { int n; cin >> n; vector c(n, 0); int total = 0; for (int i = 0; i < n; i++) { cin >> c[i]; total += c[i]; } int mini = total / 10; int ans = 0; for (int i = 0; i < n; i++) { if (c[i] <= mini) { ans += 30; } } cout << ans << endl; return 0; }