#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  ll m = 1;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    m *= a[i];
  }
  ll ans = 0;
  for (int i = 0; i < (n); i++) {
    ans += (m - 1) % a[i];
  }
  cout << ans << endl;
  return 0;
}
