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