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