#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 1;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long N;
long long f(long long m, vector<long long>& a) {
  long long res = 0;
  for (long long i = 0; i < N; i++) {
    res += m % a[i];
  }
  return res;
}
int main() {
  cin >> N;
  vector<long long> a(N);
  for (long long i = 0; i < N; i++) cin >> a[i];
  long long ap = 1;
  for (long long i = 0; i < N; i++) ap *= a[i];
  ap--;
  cout << f(ap, a) << endl;
}
