#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int N;
vector<int> A;
using ll = long long;
ll f(ll m) {
  ll ans = 0;
  for (int i = 0; i < (int)(N); i++) ans += m % A[i];
  return ans;
}
int main() {
  cin >> N;
  A.resize(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  ll ans = 1;
  for (int i = 0; i < (int)(N); i++) ans *= A[i];
  cout << f(ans - 1) << endl;
  return 0;
}
