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

int main(){
  int N;
  cin>>N;
  int A[N];
  for(int i = 0; i < N; i++){
    cin>>A[i];
  }
  int count = 0;
  for(int i = 0; i < N; i++){
    if(A[i] <= 10){
      
    }else if(A[i] > 10){
      count += A[i] - 10;
    }else{
      
    }
  }
  cout<<count<<endl;
  return 0;
}
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
using namespace std;

struct UF{
    vector<int> p;
    UF(int n):p(n, -1){}

    int leader(int x){
        if(p[x] < 0)return x;
        return p[x] = leader(p[x]);
    }
    
    void merge(int a, int b){
        a = leader(a);
        b = leader(b);
        if(a == b)return;
        p[a] += p[b];
        p[b] = a;
    }
};

set<int> leaders;

int main(){
    int n, f;
    cin >> n;
    UF uf(n+1);
    for(int i = 1;i <= n;i++){
        cin >> f;
        uf.merge(i, f);
    }
    for(int i = 1;i <= n;i++){
        leaders.insert(uf.leader(i));
    }
    long long ans = 1;
    for(int i = 0;i < leaders.size();i++){
        ans = (ans + ans) % 998244353;
    }
    ans--;
    cout << ans << endl;
    return 0;
}
