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

#define For(i,a,b) for(int (i) = (a);(i) < (b);i++)
#define Rep(i,n) For((i),0,(n))
#define All(a) (a).begin(),(a).end()
#define sp " "
#define INF 1e18
#define INT_INF 1e9
#define MAX 1000

typedef long long ll;
const ll MOD = 1000000007;
const ll MOD_9 = 998244353;

int main(){
    ll N;
    cin >> N;
    ll v[N];
    ll ans = 0;
    Rep(i,N){
        cin >> v[i];
        ans += v[i];
    }
    ll x = (N*(N+1)/2);
    ans -= x;
    cout << ans << endl;
    //cin >> N;
}
