#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
typedef long int li;
typedef long long int lli;
typedef vector<int> vi;
typedef vector<long long int> vlli;
typedef vector<double> vd;
typedef vector<char> vc;
typedef vector<vector<int>> vvi;
typedef vector<vector<double>> vvd;
typedef vector<vector<char>> vvc;
typedef vector<vector<vector<int>>> vvvi;
typedef vector<vector<vector<double>>> vvvd;
typedef vector<vector<vector<char>>> vvvc;
#define rep(i, n) for(int i = 0; i < n; i++)
#define w1 while(1)

void yakusuu_rekkyo(long long int n, vlli &divisor)
{
    for(long long i = 1; i * i <= n; i++)
    {
        if(n % i == 0)
        {
            divisor.push_back(i);

            if(i * i != n)
            {
                divisor.push_back(n / i);
            }
        }
    }

    sort(divisor.begin(), divisor.end());
}

bool sosuu_hantei(long long n)
{
    for(long long i = 2; i * i <= n; i++)
    {
        if(n % i == 0)
        {
            return false;
        }
    }

    return true;
}

void ruisekiwa(const vi &num, vi &sum)
{
    rep(i, num.size())
    {
        sum.push_back(sum.at(i) + num.at(i));
    }

    rep(i, sum.size())
    {
        cout << sum.at(i) << endl;
    }
}

int main(void)
{
    int N = 0;
    cin >> N;

    vi fruits(N, 0);
    rep(i, N)
    {
        cin >> fruits[i];
    }

    int sum = 0;

    rep(i, N)
    {
        if(fruits[i] > 10)
        {
            sum += fruits[i] - 10;
        }
    }

    cout << sum << endl;

    return 0;
}
#include <bits/stdc++.h>
#define mod 1000000007
#define point complex<long double>
#define pi acos(-1)

typedef long long ll;
typedef long double ld;

using namespace std;

void Fastio()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}

bool runTestCase() {
	int n; cin >> n;
	ll res = 0;
	for (int i = 0; i < n; i++) {
		ll x; cin >> x;
		if (x > 10)
			res += x - 10;
	}
	cout << res << '\n';
	return 0;
}
int main()
{
	Fastio();
	int ttt = 1; //cin >> ttt;
	while (ttt--) {
		runTestCase();
	}

	return 0;
}
