#include <bits/stdc++.h>
using namespace std;
void init() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long &i : a) cin >> i;
  long long prod = 1;
  for (long long &i : a) prod *= i;
  prod--;
  long long ans = 0;
  for (long long &x : a) ans += prod % x;
  cout << ans << "\n";
}
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  init();
  return 0;
}
