#include <bits/stdc++.h>
using namespace std;
long f(long x, const vector<long>& a) {
  long c = 0;
  for (auto& i : a) {
    c += x % i;
  }
  return c;
}
int main() {
  int n;
  cin >> n;
  vector<long> a(n);
  long mul = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mul *= a[i];
  }
  cout << f(mul - 1, a) << endl;
}
