#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;

    int count = 0;
    for (int i = 0; i < N; i++) {
        int x;
        cin >> x;
        if (x > 10)
            count += x - 10;
    }

    cout << count << endl;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>           pii;
typedef pair<string,string>     pss;
typedef pair<ll,ll>             pll;
typedef vector<int>             vi;
typedef vector<vi>              vvi;
typedef vector<pii>             vpi;
typedef vector<ll>              vl;
typedef vector<vl>              vvl;
#define f(i,a,b)                for(int (i)=(a);(i)<(b);(i)++)
#define d(i,a,b)                for(int (i)=a;(i)>=(b);(i)--)
#define foreach(a,b)            for(auto&(a) : (b))
#define MAX(a,b)                max(a,b)
#define MIN(a,b)                min(a,b)
#define fi                      first
#define se                      second
#define mp                      make_pair
#define all(v)                  v.begin(),v.end()
#define Sort(v)                 sort(all(v))
#define Reverse(v)              reverse(all(v))
#define Permute                 next_permutation
#define TC(t)                   while(t--)
#define pb                      push_back
#define pf                      push_front
#define IM                      INT_max
#define IMI                     INT_MIN
void solve(){
    int t;
    cin>>t;
    int sum=0;
    TC(t){
     int k;
     cin>>k;
     if(k/10>0)
         sum=sum+k-10;
    }
    cout<<sum;
}
int main(){

#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    freopen("error.txt","w",stderr);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}
