#include<bits/stdc++.h>

#define loop(i,n)   for(int i = 0; i < n; ++ i)
#define rloop(i, n) for(int i = n-1; i >=0; i--)
#define inp(arr, n) for(int i=0; i<n; i++) cin >> arr[i];
#define deb(x)		cout << "  " << #x << " " << x << endl // used to debug any variable
#define mod         1000000007
#define pb          push_back
#define ff          first
#define ss          second
#define Vi          vector<int>
#define Vs          vector<string>
#define Vll         vector<long long>
#define Vl          vector<long>
#define Vc          vector<char>
#define all(v)      v.begin(), v.end()


const long double PI = 3.141592653589793236L;

typedef long long int ll;
typedef unsigned long long int usll;
typedef long double ld;
typedef double db;

using namespace std;

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

void solve()
{
    int n;
    cin>>n;
    Vi arr(n);
    ll res=0;
    inp(arr,n);
    loop(i,n)
    {
        if(arr[i]>10)
            res=res+(arr[i]-10);
    }
    cout<<res;
}

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    //int T = 1;cin >> T;while (T--)
        solve();
        
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, nuts = 0;
    cin >> n;
    vector<int> a(n);
    for(int i = 0; i<n; i++) cin >> a[i];
    for(int k:a) if(k>10) nuts+=(k-10);
    cout << nuts << endl;
    return 0;
}