#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  long long mul = 1;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    mul *= a[i];
  }
  long long ans = 0;
  for (int i = 0; i < (n); ++i) {
    ans += (mul - 1) % a[i];
  }
  cout << ans << '\n';
  return 0;
}
