#include "bits/stdc++.h"
using namespace std;
using i64 = long long;

signed main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);

    i64 N;
    i64 sum = 0;
    cin >> N;

    for (int i = 0; i < N; ++i) {
        i64 v;
        cin >> v;
        sum += v;
    }

    cout << sum - N * (N + 1) / 2 << endl;

    return 0;
}

