#include <bits/stdc++.h>
 
using namespace std;
 
#define int unsigned long long
#define all(x) x.begin(), x.end()
#define pb push_back
#define mp make_pair
#define se second
#define fi first
 
typedef map<int, int> mi;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef set<int> si;
 
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;

int gcd(int a, int b) {
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

signed main() {
    #ifndef ONLINE_JUDGE
        freopen("inputf.txt", "r", stdin);
        freopen("outputf.txt", "w", stdout);
    #endif
 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int n;
    cin >> n;

    int sum=0;
    while(n--) {
        int x;
        cin >> x;

        if(x>10) {
            x -= 10;
            sum += x;
        }
    }

    cout << sum;
 
    return 0;
}
#include<bits/stdc++.h>
using ll= long long;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define RREP(i,n) for(ll i=1;i<ll(n+1);i++)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define ALL(x) x.begin(),x.end()

#define JU_5 101010
#define INF (int)1e9 //10^9:∞
#define LLINF (long long)1e12
#define MOD (int)1e9+7 //10^9+7:合同式の法
#define PI 3.141592653589
#define PB push_back
#define Fir first
#define Sec second
#define __MAGIC__ ios::sync_with_stdio(false);cin.tie(nullptr);

#define YESNO(T) if(T){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yesno(T) if(T){cout<<"yes"<<endl;}else{cout<<"no"<<endl;}
#define YesNo(T) if(T){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}

#define Graph vector<vector<int>>
#define PII pair<int,int>
#define VI vector<int>
#define VVI vector<vector<int>>  // Graph
#define VPII vector<pair<int,int>>
#define VPLL vector<pair<ll, ll>>


#define DDD fixed<<setprecision(17)

using namespace std;
/*..................DEFINE GLOBAL VARIABLES...................*/


/*.....................DEFINE FUNCTIONS ......................*/
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

/*.........................memo0

...........................*/

/*.........................memo1

...........................*/

/*.........................memo2

...........................*/
signed main() {
    __MAGIC__
    ll N;
    cin >> N;
    ll A[JU_5];
    REP(i, N) cin >> A[i];
    ll res = 0;
    REP(i, N) {
        ll tmp = A[i];
        if(tmp <= 10) continue;
        res += tmp - 10;
    }
    cout << res << endl;
    return 0;
}