#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000007;
const int mod = 1000000007;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int answer(bool f) {
  if (f)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
int main() {
  int N;
  cin >> N;
  long long a[N];
  long long mul = 1;
  int g = 1;
  for (int i = 0; i < (N); i++) {
    cin >> a[i];
    mul *= a[i];
  }
  int ans = 0;
  mul--;
  for (int i = 0; i < (N); i++) ans += mul % a[i];
  cout << ans << endl;
}
