#include #include #include #include #include using namespace std; int main(){ int N, C; cin >> N; int sum = 0; int ans = N * 30; vector v; for(int i = 0; i < N; i++){ cin >> C; v.push_back(C); sum += C; } int ave = sum / N; for(int i = 0; i < N; i++){ if(v[i] <= ave) ans -= 30; } cout << ans << endl; return 0; }