#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (T &x : vec) is >> x;
  return is;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a;
  long long int res = 1;
  for (int i = 0, i_len = (n); i < i_len; ++i) res *= a[i];
  long long int ans = 0;
  for (int i = 0, i_len = (n); i < i_len; ++i) ans += (res - 1) % a[i];
  cout << ans << endl;
  return 0;
}
