#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (ll i = (0), __last_i = (v.size()); i < __last_i; i++) {
    if (i) os << " ";
    os << v[i];
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
  for (ll i = (0), __last_i = (v.size()); i < __last_i; i++) {
    if (i) os << endl;
    os << v[i];
  }
  return os;
}
ll yoshi(ll n, ll y) { return n % y; }
int main() {
  ll N;
  vector<ll> A(N);
  cin >> N;
  for (ll i = (0), __last_i = (N); i < __last_i; i++) cin >> A[i];
  ll M = 1;
  for (ll i = (0), __last_i = (N); i < __last_i; i++) M *= A[i];
  --M;
  ll ans = 0;
  for (ll i = (0), __last_i = (N); i < __last_i; i++) ans += yoshi(M, A[i]);
  cout << ans << endl;
}
