#include #define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) using namespace std; int main() { fastIO; int n; cin >> n; vector C(n); int sum = 0; for (int i = 0; i < n; ++i) { cin >> C[i]; sum += C[i]; } int ans = 0; for (const auto c : C) { if (c <= sum / 10) { ans += 30; } } cout << ans << '\n'; return 0; }