#include<bits/stdc++.h>
using namespace std;
int main(){
    
    int M,sum=0;
    cin>>M;
     int ar[M];
             for(int i=0;i<M;i++){
             cin>>ar[i];
                   if(ar[i]>=10){
               sum+=(ar[i]-10);
         }

    }
    
    cout<<sum<<endl;

   return 0;
}
#include<bits/stdc++.h>
#include<iostream>
using namespace std;


#define in(i,a,n) for(i=a;i<n;i++)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define ll long long
#define mod 1000000007
#define all(x) x.begin(),x.end()
#define F first
#define S second
#define vi vector<int> 
#define vll vector<long long>

void solve();

int main(){
    ll t=1;
   // cin>>t;
    while(t--){
        solve();
    }

}

void solve(){
    int n,ans=0,i=0;
    cin>>n;

    vector<int> a;
    in(i,0,n){
        int y;
        cin>>y;
        a.push_back(y);
       ;
    }
    in(i,0,n){
        if(a[i]>10){
        
            ans=ans+(a[i]-10);
        }
    }
    cout<<ans<<endl;

}