#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define ld long double

signed main() {
	ll n; cin >> n;
	ll sum_v = 0;
	for (int i = 0; i < n; ++i) {
		ll v; cin >> v;
		sum_v += v;
	}
	cout << (sum_v - (n * (n + 1) / 2)) << endl;
	return 0;
}
