#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  int count = 1;
  for (int j = 0; j < N; j++) {
    count = count * vec.at(j);
  }
  count = count - 1;
  int answer = 0;
  for (int k = 0; k < N; k++) {
    answer = answer + count % vec.at(k);
  }
  cout << answer << endl;
}
