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