#include <bits/stdc++.h>
using namespace std;
int sum_digits(int num);
template <class T>
vector<T> copy_vector(vector<T> vec);
int main() {
  int n;
  cin >> n;
  vector<long> a(n);
  long total = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    total *= a[i];
  }
  total--;
  long rtn = 0;
  for (int i = 0; i < n; i++) {
    rtn += total % a[i];
  }
  cout << rtn << endl;
  return 0;
}
int sum_digits(int num) {
  int rtn = 0;
  while (num != 0) {
    int tmp = num % 10;
    rtn += tmp;
    num /= 10;
  }
  return rtn;
}
template <class T>
vector<T> copy_vector(vector<T> vec) {
  vector<T> rtn;
  rtn.reserve(vec.size());
  copy(vec.begin(), vec.end(), back_inserter(rtn));
  return rtn;
}
