#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long long m = 1;
  long v;
  vector<long> V;
  for (int i = 0; i < N; i++) {
    cin >> v;
    m = m * v;
    V.push_back(v);
  }
  long f = 0;
  for (auto k : V) f += (m - 1) % k;
  cout << f << endl;
  return 0;
}
