#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using ld=long double;
using vin=vector<int>;
using vvin=vector<vin>;
using vll=vector<ll>;
using vvll=vector<vll>;
using vst=vector<string>;
using P = pair<ll,ll>;
using vp=vector<P>;
using vvp=vector<vp>;
const int inf=1e9+7;
const ll INF=9e18/2;
const long double PI = acosl(-1.0);
const long double EPS=1e-10;
template <typename T> bool chmin(T &a, const T& b){if(a > b){a = b;return true;}return false;}
template <typename T> bool chmax(T &a, const T& b){if(a < b){a = b;return true;}return false;}
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[8] = {0,0,1,-1,1,1,-1,-1};
const int dy[8] = {1,-1,0,0,1,-1,1,-1};
void vecout(const vector<int> &a){
  int n=a.size();
  rep(i,0,n)cout<<a[i]<<(i==n-1 ? "":" ");
  cout<<endl;
}


int main(){//cout<<fixed<<setprecision(20);
  int n;
  cin>>n;
  int ans=0;
  rep(i,0,n){
    int a;
    cin>>a;
    if(a<=10)continue;
    else ans+=(a-10);
  }
  cout<<ans<<endl;
}
#include <bits/stdc++.h>
using namespace std;

#define ll long long

void solve() {
	int n;
	cin >> n;
	vector<int> ar(n);
	for (int &x : ar) {
		cin >> x;
	}

	int ans = 0;
	for (int &x : ar) {
		if (x > 10) {
			ans += x - 10;
		}
	}
	cout << ans;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int t = 1, i = 1;
	//cin >> t;
	while(t--) {
		//cout << "Case #" << i << ": ";
		solve();
		//i++;
	}
	return 0;
}

