#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::vector<int> a(n);
  long long prod = 1;
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
    prod *= a[i];
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += ((prod - 1) % a[i]);
  }
  std::cout << sum << "\n";
  return 0;
}
