#include <bits/stdc++.h>
using namespace std;
long long func(vector<long long> &a, long long m) {
  long long res = 0;
  for (long long i = 0; i < a.size(); i++) res += (m % a[i]);
  return res;
}
signed main() {
  long long n, m;
  cin >> n;
  m = 1;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    m *= a[i];
  }
  cout << func(a, m - 1) << endl;
}
