#include <bits/stdc++.h>
using namespace std;
long long a[10000];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    long long sum = 1;
    for (int i = 0; i <= n - 1; i++) {
      cin >> a[i];
      sum *= a[i];
    }
    long long sum2 = 0;
    sum--;
    for (int i = 0; i <= n - 1; i++) {
      sum2 += sum % a[i];
    }
    cout << sum2 << endl;
  }
}
