#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int m, long long int n) {
  if ((0 == m) || (0 == n)) return 0;
  while (m != n) {
    if (m > n)
      m = m - n;
    else
      n = n - m;
  }
  return m;
}
long long int lcm(long long int m, long long int n) {
  if ((0 == m) || (0 == n)) return 0;
  return ((m / gcd(m, n)) * n);
}
int f(int n, int x, int *a) {
  int sum = 0;
  for (int i = int(0); i < int(n); ++i) {
    sum += x % a[i];
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int N;
  long long int a[3000];
  cin >> N;
  long long int x = 1;
  for (int i = int(0); i < int(N); ++i) {
    cin >> a[i];
    x *= a[i];
  }
  long long int sum = 0;
  for (int i = int(0); i < int(N); ++i) {
    sum += (x - 1) % a[i];
  }
  cout << sum << "\n";
  return 0;
}
