#include "bits/stdc++.h"
#define rep(var,init,max) for(int (var)=(init); (var) < (max); ++(var))
#define SORT(v) sort((v).begin(),(v).end())
#define RSORT(v) sort((v).begin(),(v).end()),reverse((v).begin(),(v).end())
using namespace std;

using ll = long long;
using ull = unsigned long long;

const int mod107 = 1e9 + 7;
const int mod998 = 998244353;

template<typename T>
using vec = vector<T>;
template<typename T>
using mat = vector<vector<T>>;

bool debugflag = false;

template<typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
	for (int i = 0; i < (int)v.size(); ++i) {
		os << v[i] << " ";
	}
	return os;
}

template<typename T>
istream& operator>>(istream& is, vector<T>& v) {
	for (T& in : v) is >> in;
	return is;
}

template<typename T>
ostream& operator<<(ostream& os, const mat<T>& v) {
	for (int i = 0; i < (int)v.size(); ++i) {
		os << v[i] << endl;
	}
	return os;
}

void debug() {
	cout << endl;
}

template<class Head, class... Tail>
void debug(Head&& head, Tail&&... tail) {
	if (!debugflag) return;
	cout << head << " ";
	debug(forward<Tail>(tail)...);
}

template< int mod >
struct ModInt {
    int x;

    ModInt() : x(0) {}

    ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}

    ModInt& operator+=(const ModInt& p) {
        if ((x += p.x) >= mod) x -= mod;
        return *this;
    }

    ModInt& operator-=(const ModInt& p) {
        if ((x += mod - p.x) >= mod) x -= mod;
        return *this;
    }

    ModInt& operator*=(const ModInt& p) {
        x = (int)(1LL * x * p.x % mod);
        return *this;
    }

    ModInt& operator/=(const ModInt& p) {
        *this *= p.inverse();
        return *this;
    }

    ModInt operator-() const { return ModInt(-x); }

    ModInt operator+(const ModInt& p) const { return ModInt(*this) += p; }

    ModInt operator-(const ModInt& p) const { return ModInt(*this) -= p; }

    ModInt operator*(const ModInt& p) const { return ModInt(*this) *= p; }

    ModInt operator/(const ModInt& p) const { return ModInt(*this) /= p; }

    bool operator==(const ModInt& p) const { return x == p.x; }

    bool operator!=(const ModInt& p) const { return x != p.x; }

    ModInt inverse() const {
        int a = x, b = mod, u = 1, v = 0, t;
        while (b > 0) {
            t = a / b;
            swap(a -= t * b, b);
            swap(u -= t * v, v);
        }
        return ModInt(u);
    }

    ModInt pow(int64_t n) const {
        ModInt ret(1), mul(x);
        while (n > 0) {
            if (n & 1) ret *= mul;
            mul *= mul;
            n >>= 1;
        }
        return ret;
    }

    friend ostream& operator<<(ostream& os, const ModInt& p) {
        return os << p.x;
    }

    friend istream& operator>>(istream& is, ModInt& a) {
        int64_t t;
        is >> t;
        a = ModInt< mod >(t);
        return (is);
    }

    static int get_mod() { return mod; }
};

using modint = ModInt< mod998 >;

template<typename T>
T gcd(T x, T y) {
	if (y == 0) return x;
	else return gcd(y, x % y);
}

template<typename T>
T lcm(T x, T y) {
    return x / gcd(x, y) * y;
}

int main() {
    int N; cin >> N;
    vec<int> A(N); cin >> A;
    int ans = 0;
    rep(i, 0, N) {
        ans += max(0, A[i] - 10);
    }
    cout << ans << endl;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    int count = 0;
    for (int i = 0; i < n; i++)
    {
        int a;
        cin >> a;
        if (a <= 10)
        {
            continue;
        }
        else
        {
            count += a - 10;
        }
    }
    cout << count;
    return 0;
}