#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
long long f(long long num) {
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    sum += (num % a[i]);
  }
  return sum;
}
int main() {
  cin >> n;
  a.resize(n);
  long long sum = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum *= a[i];
  }
  cout << f(sum - 1LL) << endl;
}
