#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long *a = new long long[n];
  long long tmp = 1;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) tmp *= a[i];
  long long ans = 0;
  for (int i = 0; i < n; i++) ans += (tmp - 1) % a[i];
  cout << ans << endl;
  return 0;
}
