#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int sum = 0;
  int time = 1;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
    time *= a.at(i);
  }
  int m = time;
  for (int i = 0; i < n; i++) {
    sum += (m - 1) % a.at(i);
  }
  cout << sum << endl;
}
