#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int N, M;
int cnt = 0;
ll ans = 0LL;
int i_index;
int dh[4] = {1, 0, -1, 0};
int dw[4] = {0, 1, 0, -1};
string board[64];
int main() {
  int n, m = 1, sum;
  cin >> n;
  int a[n];
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
    m *= a[i];
  }
  for (int i = 0; i < (int)(n); i++) {
    sum += (m - 1) % a[i];
  }
  cout << sum << endl;
  return 0;
}
