#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i <= n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n)
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;
using Graph = vector<vector<int>>;
using Edge = pair<int, ll>;
const ll INF = 1LL << 60;
const int MAX = 100000;
const int MOD = 1000000007;

int main()
{
    // cin高速化
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, a;
    // 入力。1オリジン
    cin >> n;
    int ans = 0;
    REP(i, n)
    {
        cin >> a;
        if (a > 10)
            ans += a - 10;
    }

    cout << ans << "\n";
    return 0;
}
#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define sz(x) (int)(x).size()
#define S second
#define F first
#define all(x) (x).begin(), (x).end()

using namespace std;
using ll = long long;

void setIO(string name = "") {
	ios_base::sync_with_stdio(NULL);
	cin.tie(NULL);
	cout.tie(NULL);

	if (sz(name)) {
		freopen((name + ".in").c_str(), "r", stdin);
		freopen((name + ".out").c_str(), "w", stdout);
	}
}

const int inf = 1e9;
const ll INF = 1e18;            
const int mod = 1e9 + 7;
const int MAXN = 1e6 + 5;

int n;

void solve() {
	cin >> n;

	int ret = 0;
	for (int i = 1; i <= n; i++) {
		int x;
		cin >> x;
		if (x > 10) ret += (x - 10);
	}

	cout << ret;
}

main() {
	setIO();
	
	int tt = 1;
	// cin >> tt;
	while (tt--) {
		solve();
	}
	
	return 0;
}
