#include using namespace std; int main() { int N; cin >> N; vector v(N); int a = 0; for (int i = 0; i < N; i++) { cin >> v.at(i); a += v.at(i); //cout << v.at(i) << ',' << a << endl; } int sum = 0; for (int i = 0; i < N; i++) { double n = (double)v.at(i) / a; //cout << n << endl; if (n <= 0.1) sum += 30; } cout << sum << endl; }