
#include<bits/stdc++.h>
using namespace std;
//_______________________Macros Start____________________________
#define pb push_back
#define ll long long
#define vi vector <int>
#define vl vector <ll>
#define vii vector < pair <int,int> >
#define vll vector < pair <ll,ll> > 
#define mii map<int,int>
#define mll map<ll,ll>
#define si set <int>
#define sl set <ll>
#define all(a) a.begin(),a.end()
#define pii pair<int,int>
#define fr first
#define sc second
#define rep(i,a,n) for(ll i=a ; i<n ; i++)
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
// ________________________Macros End______________________________

// ________________________Utility Functions Start__________________
ll M=1e9+7;

ll binomialCoeff(ll n, ll k) 
{ 
    ll res = 1; 
  
    // Since C(n, k) = C(n, n-k) 
    if (k > n - k) 
        k = n - k; 
  
    // Calculate value of 
    // [n * (n-1) *---* (n-k+1)] / [k * (k-1) *----* 1] 
    for (ll i = 0; i < k; ++i) { 
        res *= (n - i); 
        res /= (i + 1); 
    } 
  
    return res; 
} 
ll mods(ll a,ll b){
    a=a%M;
    b=b%M;
    return (a+b)%M;
}
ll modp(ll a,ll b){
    a=a%M;
    b=b%M;
    return (a*b)%M;

}
ll pow(ll a, ll b){
    if(b==0) return 1;
    if(b%2==0) {
        ll x=pow(a,b/2);
        return modp(x,x);
    }
    else{
        ll x=pow(a,b/2);
        ll y=modp(x,x);
        return modp(y,a);
    }
}
struct MyComp
{
    bool operator()(const pair<int,int>& x, const pair<int,int>& y) const
    {
        return x.second > y.second || (x.second == y.second && x.first > y.first);
    }
};
//__________________________Utility Fuction End____________________________________

//___________________________Starters for Graph Begin_______________________________
const int N=1e5+5;
vi adj[N];
vi visited(N,0);
void makeGraph(int m){
    int x,y;
    for(int i=0;i<m;i++){
        cin>>x>>y;
        adj[x].pb(y);
        adj[y].pb(x);
    }
}


//_____________________________Starters for Graph End___________________________________







//____________________________Main Start__________________________________________________
int main(){
    fastio
    int n;
    cin>>n;
    vi v(n);
    for(int i=0;i<n;i++) cin>>v[i];

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



    

    
    
    
}
//_____________________________Main End______________________________________________________

#include <iostream>
#include <string>
#include <bitset>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long int ll;

void solve()
{

}


int main()
{
	IOS
	int n;
	cin >> n;

	ll ans = 0;
	
	for (int i = 0; i < n; ++i)
	{
		ll cur;
		cin >> cur;

		if (cur <= 10)  continue;
		ans += (cur - 10);
	}

	cout << ans << endl;

	return 0;
}