#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1 << 29;
const long long INFL = 1e18;
const int MOD = 1000000007;
const int MAX = 210000;
int n;
long long target_num, ans;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
void solve() {
  cin >> n;
  vector<int> a(n, 0);
  target_num = 1;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    target_num *= a[i];
  }
  target_num--;
  for (int i = 0; i < n; ++i) {
    ans += target_num % a[i];
  }
  cout << ans << endl;
  return;
}
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
int main(int args, char* argv[]) { solve(); }
