#include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<cmath>
#include<algorithm>
using namespace std;
const int maxn=1001000,maxm=0,mod=998244353;
int n;
//int a[maxn];
//vector <int> v;
//char s[maxn];
inline int read(){
    int res=0;
    char ch=getchar(),ch1=ch;
    while(!isdigit(ch))ch1=ch,ch=getchar();
    while(isdigit(ch))res=(res<<3)+(res<<1)+ch-'0',ch=getchar();
    return ch1=='-'?-res:res;
}
void proc(){
    int n=read();
    int ans=0;
    for(int i=1;i<=n;++i){
        ans+=max(0,read()-10);
    }
    cout<<ans<<endl;
}
int main(){
    int T=1;
    while(T--)proc();
    return 0;
}
#include <bits/stdc++.h>
#define int long long
#define sum(v) accumulate(v.begin(), v.end(), 0)
#define $ cout<<"YES\n"
#define _$ cout<<"NO\n"
using namespace std;

int32_t main(){
	int k,y,a,b,t; cin>>t;
	int ans = 0;
	while(t--){
		cin>>a;
		if (a>10)
		{
			ans=ans+(a-10);
		}
	}cout<<ans;
	return 0;
}
