#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  scanf("%lld", &N);
  vector<long long> a;
  for (int i = 0; i < (N); ++i) {
    long long x;
    scanf("%lld", &x);
    a.push_back(x);
  }
  long long ans = 0;
  long long MOD = 1;
  for (int i = 0; i < (a.size()); ++i) {
    MOD = MOD * a[i];
  }
  for (int i = 0; i < (a.size()); ++i) {
    ans += (MOD - 1) % a[i];
  }
  printf("%lld\n", ans);
  return 0;
}
