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