#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(int argc, char const *argv[]) {
  ll n, m = 1, ans = 0, a[3100];
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
    m *= a[i];
  }
  m--;
  for (int i = 0; i < n; i++) {
    ans += m % a[i];
  }
  std::cout << ans << '\n';
  return 0;
}
