#include <bits/stdc++.h>
const long long mll = 9223372036854775807;
const int mint = (2 << 31) - 1;
using namespace std;
vector<long long> v;
int main() {
  int n;
  long long t;
  scanf("%d", &n);
  long long m = 1;
  for (int i = 0; i < n; i++) scanf("%lld", &t), v.push_back(t), m *= t;
  m -= 1;
  long long nt = 0;
  for (int i = 0; i < n; i++) {
    nt += m % v[i];
  }
  printf("%lld\n", nt);
}
