#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n, m, res;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m *= a[i];
  }
  for (int i = 0; i < n; i++) res += (m - 1) % a[i];
  cout << res << endl;
  return 0;
}
