#include <bits/stdc++.h>
//#pragma once
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define F first
#define S second
#define vi vector<int>
#define pii pair<int,int>
#define FOR(i, a, b) for(int i = (a); i <= (b); ++i)
#define FORN(i, a, b) for(int i = (a); i < (b); ++i)
#define FORD(i, a, b) for(int i = a; i >=b; --i)
#define pb push_back
#define mp make_pair
#define yes cout <<"YES"<<"\n"
#define no  cout << "NO"<<"\n"
#define MOD 1000000007
#define maxn 1000005
#define MIN(x,y) if (x > (y)) x = (y)
#define MAX(x,y) if (x < (y)) x = (y)
#define reset(x) memset(x, 0, sizeof(x))
#define all(x) (x.begin(),x.end())
#define ll long long
#define db double
#define ull unsigned long long
#define udb unsigned double
#define ui unsigned int
#define ldb long double
#define ulli unsigned long long int
#define lli long long int
#define str string
//#define fl Team Flash a nham float
#define fl float
#define TASK "A"
const int INF = 1e9+5;
using namespace std;
// ATTEMPED 1
int n, a[1001];
int c = 0;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    if(fopen(TASK".inp", "r")) {
        freopen(TASK".inp","r",stdin);
        freopen(TASK".out","w",stdout);
    }
    scanf("%d", &n);
    FOR(i,1,n) scanf("%d", &a[i]);
    FOR(i,1,n){
        if(a[i] > 10) c += a[i] - 10;
    }
    printf("%d", c);
}
// Designed and Coded by YasashiSensei.

#include <bits/stdc++.h>
using namespace std;
#define short int

int main() {
    short n; cin >> n;
    short a;
    int sum = 0;

    for(short i = 0; i < n; i++) {
        cin >> a;
        if(a > 10) {
            sum += a-10;
        }
    }

    cout << sum;

return 0;
}