#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
signed main() {
  long long N;
  cin >> N;
  long long a[N];
  long long mx = 1;
  for (long long i = 0; i < N; i++) {
    cin >> a[i];
    mx *= a[i];
  }
  mx = mx - 1;
  long long ans = 0;
  for (long long i = 0; i < N; i++) {
    ans += mx % a[i];
  }
  cout << ans << endl;
  return 0;
}
