#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define loop(i,a,b) for(ll i=a;i<=b;i++)
#define pb push_back
#define mod 1000000007
void contest()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
#endif
}
ll dmod(ll x) {return ((x + mod) % mod);}
ll modular_power(ll x, ll y)
{ll ans = 1; while (y) {if (y & 1)ans = dmod(ans * x); y /= 2; x = dmod(x * x);} return ans;}
ll inverse(ll x) {return modular_power(dmod(x), mod - 2);}
ll rotated_search(ll a[], ll l, ll h, ll key) {
  if (l > h)return -1; ll mid = (l + h) / 2; if (a[mid] == key)return mid;
  if (a[l] <= a[mid]) {
    if (key >= a[l] && key <= a[mid])return rotated_search(a, l, mid - 1, key); return rotated_search(a, mid + 1, h, key);
  }
  if (key >= a[mid] && key <= a[h])return rotated_search(a, mid + 1, h, key); return rotated_search(a, l, mid - 1, key);
}
ll knight(ll n) {return n * n * (n * n - 1) / 2 - 4 * (n - 1) * (n - 2);}
struct custom_hash
{
  static uint64_t splitmix64(uint64_t x)
  {
    x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const
  {
    static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
bool comp(pair<int, int> l1, pair<int, int> l2)
{
  if (l1.first < l2.first)return true;
  return false;
}
long long int tt(long long int l, long long int r)
{
  long long int temp1 = ((l) * (l + 1)) / 2;
  long long int temp2 = ((r) * (r + 1)) / 2;
  return temp2 - temp1;
}

int main()
{
  contest();
  fast
  /////   CODE BELOW    //////////
  //unordered_map<long long ll, long long ll, custom_hash> mp;

  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++)cin >> a[i];
  long long int ans = 0;
  for (int i = 0; i < n; i++)
  {
    if (a[i] > 10)
    {
      ans += (a[i] - 10);
    }
  }
  cout << ans;
}

// 10 10
// ...#..A.#.
// ....B...##
// ...#......
// ..........
// ...#.#....
// ..##..#...
// .......#..
// #.......#.
// ...#....#.
// #......#..

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI; 
using PII = pair<int, int>; 

inline void quickread() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
}

ll qpow(ll a, ll b, ll p) {
	ll ret = 1;
    while(b) {
        if(b & 1) ret = (ret * a) % p;
        a = (a * a) % p;
        b >>= 1;
    }
    return ret;
}


int main() {
	quickread();
	
	int n, ret = 0;
	cin >> n;
	VI a(n);
	for(int i =0 ; i < n; i++) {
		cin >> a[i];
		if(a[i] > 10) {
			ret += (a[i] - 10);
		}
	}
	cout << ret << endl;
	return 0;
}