#pragma GCC optimize ("O2")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;


using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int N;
	cin >> N;
	int kotae = 0;
	rep(i, N) {
		int a;
		cin >> a;
		if (a >= 10) kotae += a - 10;
	}
	co(kotae);

	Would you please return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
//ll a[10000007];

// ll binpow(ll a, ll b) {
//     ll res = 1;
//     while (b > 0) {
//         if (b & 1)
//             res = res * a;
//         a = a * a;
//         b >>= 1;
//     }
//     return res;
// }

// void SieveOfEratosthenes(ll n)
// {
//     // Create a boolean array "prime[0..n]" and initialize
//     // all entries it as true. A value in prime[i] will 
//     // finally be false if i is Not a prime, else true.
//     bool prime[n + 1];
//     memset(prime, true, sizeof(prime));
 
//     for (ll p = 2; p * p <= n; p++)
//     {
//         if (prime[p] == true)
//         {
//             for (ll i = p * p; i <= n; i += p)
//                 prime[i] = false;
//         }
//     }
//     /* Print all prime numbers
//     for (ll p = 2; p <= n; p++)
//         if (prime[p])
//             cout << p << " ";*/
// }

int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL); 

#ifndef ONLINE_JUDGE 
freopen("input.txt", "r", stdin); 
freopen("error.txt", "w", stderr); 
freopen("output.txt", "w", stdout); 
#endif 

int n,i,sum=0;
cin>>n;
int a[n];
for(i=0;i<n;i++){
	cin>>a[i];
	if(a[i]>10){
		sum+=a[i]-10;
	}
}
cout<<sum;

cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl; 
return 0; 
} 

