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