#include <bits/stdc++.h>
using namespace std;
int64_t f(const vector<int64_t>& as, int64_t m) {
  return accumulate(begin(as), end(as), 0,
                    [=](int64_t x, int y) { return x + m % y; });
}
int main() {
  size_t n;
  cin >> n;
  vector<int64_t> as(n);
  for (auto& a : as) cin >> a;
  auto cm = accumulate(begin(as), end(as), 1L,
                       [](int64_t x, int64_t y) { return x * y; });
  cout << f(as, cm - 1) << '\n';
  return 0;
}
