#include <bits/stdc++.h>
#define fast_io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define ll long long
#define PI acos(-1)
using namespace std;

int main()
{
    fast_io;
    int n;
    cin>>n;
    int arr[n];
    for(int i=0; i<n; i++)
    {
        cin>>arr[i];
    }
    int sum=0;
    for(int i=0; i<n; i++)
    {
        if(arr[i]<=10)
        {
            sum+=0;
        }
        else if(arr[i]>10)
        {
            sum+=(arr[i]-10);
        }
    }
    cout<<sum<<"\n";
    return 0;
}

#include <bits/stdc++.h>

#define db1(x) cout<<#x<<"="<<x<<'\n'
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n'
#define fori(i,n) for(ll i=0;i<(n);++i)
#define fora(i,a,n) for(ll i=a;i<=(n);++i)
#define forad(i,a,n) for(ll i=a;i>=(n);--i)
#define pb(v,temp) ll temp;cin>>temp;v.push_back(temp)

using namespace std;
using ll = long long;

void solve()
{
    ll n,temp,res=0;
    cin>>n;
    while(n--){
        cin>>temp;
        if(temp>10){
            res+=(temp-10);
        }

    }
    cout<<res;
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    solve();
    return 0;
}