/* Author : Rohan Tirkey */
/*        IIITA          */
 
#include<bits/stdc++.h>
using namespace std;
 
 
#define int             long long int
#define fl(i,l,r)       for(int i=l ; i<=r ; i++)
#define flr(i,r,l)      for(int i=r;i>=l;i--)
#define pb              push_back
#define mp              make_pair
#define F               first
#define S               second
#define all(x)          x.begin(), x.end()
#define fastio          ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const int mod = 1e9+7;
#define pi              3.14159265358979323846
#define vi              vector<int>
#define vip             vector< pair<int,int> >
#define test            int t; cin>>t; while(t--)
#define min(a, b)       ((a) < (b) ? (a) : (b))
#define max(a, b)       ((a) < (b) ? (b) : (a))
   
#define trav(x)         for(auto &it:x)
inline int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }
inline int ceil(int a, int b){  return (a%b==0) ? a/b : a/b +1 ;}
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define debug(x)        cout << '>' << #x << ':' << x << endl;
#define debug2(x, y)    cout << '>' << #x << ':' << x << " | " << #y << ':' << y << "\n";
#define debug3(x, y, z) cout << '>' << #x << ':' << x << " | " << #y << ':' << y << " | " << #z << ':' << z << "\n";
#define debug4(x, y, z, w) cout << '>' << #x << ':' << x << " | " << #y << ':' << y << " | " << #z << ':' << z << " | " << #w << ':' << w << "\n";
clock_t time_p=clock();
void time(){time_p=clock()-time_p;cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"sec\n";}
 
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/



void solve()
{
  int n; cin>>n;
  int sum=0;
  fl(i,1,n)
  {
    int a; cin>>a;
    if(a>10)
    {
        sum+=(a-10);
    }
  }
  cout<<sum<<"\n";
}        
signed main()
{
    fastio
    #ifndef ONLINE_JUDGE
	    freopen("input.txt","r",stdin);
	    freopen("output.txt","w",stdout);
	#endif
    
 //test {
      solve();
  //} 
  time();
}
#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef vector<ll> vi;
typedef vector<long double> vd;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<pair<ll,ll>> vp;

#define int ll
#define PB push_back
#define pb pop_back
#define in insert 
#define endl "\n"
#define MP make_pair
#define f first
#define PI 3.141592653589
#define nd second
#define Trav(a,x) for(auto &a: x)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(), x.rend()
const int MOD  = 998244353;
const int maxn = 2e6+1;

int a,b,c,d,e,k,n,m,t,s,q,x,y,ans;

int32_t main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
	
	int n; cin>>n;
	ans = 0;
	for(int i = 0; i < n; i++){
		cin>>a;
		if(a > 10)ans += (a-10);
	}
	
	cout<<ans;
	
    return 0;
}