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

using ll  = long long;
using ull = unsigned ll;
using ld  = long double;
using pi  = pair<int, int>;
using pii = pair<ll, ll>;
using vi  = vector<int>;
using vii = vector<ll>;
using vip = vector<pair<int, int>>;

const int MAX_N = 1e5 + 1;
const ll mod = 1e9 + 7;
const ll INF = 1e9;

#define PI           3.141592653589793238
#define fir          first
#define sec          second
#define all(x)       (x).begin(),(x).end()
#define rall(x)      (x).rbegin(),(x).rend()
#define pb           push_back
#define mp           make_pair
#define loop(i,n,x)  for(int i=n;i<x;i++)
#define sz(a)        ((int) (a).size())
#define For(n,x)     for(int i=1;i<=x;i++)
#define ite          iterator it
#define fast         ios_base::sync_with_stdio(false);cin.tie(NULL);
#define test         ll t;cin>>t; while(t--){solve();}
#define in           insert

void oj()
{


#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

}
ll lcm(ll a, ll b)
{
	return (a / __gcd(a, b)) * b;
}
ll power(ll x)

{
	ll res = 1;
	for (int i = 1; i <= x; i++)
	{
		res *= 2;
	}
	return res;
}


void solve()
{
	int n;
	cin >> n;
	int ans = 0;
	loop(i, 0, n)
	{
		int x;
		cin >> x;
		if (x > 10)
			ans += (x - 10);
	}
	cout << ans << endl;

}



int main()
{


	ios_base::sync_with_stdio(false); cin.tie(NULL);

	oj();

	//test;
	solve();


}

#include<bits/stdc++.h>
using namespace std;
#define ll long long 
int main()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n;
    int ans=0;
    cin>>n;
    int A[n];
    for(int i=0;i<n;i++)
    {
    	cin>>A[i];
    	if(A[i]>10)
    	{
    		ans+=(A[i]-10);
		}
	}
	cout<<ans;
	return 0;
}