#include int main(void){ int N, C[100]; int i, goukei = 0,j = 0; scanf ("%d", &N); for ( i = 0; i < N; i++){ scanf ("%d",&C[i]); goukei += C[i]; } goukei /= 10; for ( i = 0; i < N; i++){ if ( C[i] <= goukei) j += 30; } printf ("%d", j); return 0; }