#include #include #include using namespace atcoder; using mint = modint; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int n; cin>>n; int s = 0; vector c(n); rep(i,n){ cin>>c[i]; s += c[i]; } int ans = 0; rep(i,n){ if(c[i]*10<=s)ans+=30; } cout<