#include <bits/stdc++.h>
using namespace std;
int dy[4] = {0, 0, 1, -1};
int dx[4] = {1, -1, 0, 0};
int dxx[8] = {0, 0, 1, 1, 1, -1, -1, -1};
int dyy[8] = {1, -1, 0, 1, -1, 0, 1, -1};
long long gcd(long long x, long long y) {
  long long m = max(x, y), n = min(x, y);
  if (m % n == 0)
    return n;
  else
    return gcd(m % n, n);
}
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long myPow(long long x, long long n, long long m) {
  if (n == 0) return 1;
  if (n % 2 == 0)
    return myPow(x * x % m, n / 2, m);
  else
    return x * myPow(x, n - 1, m) % m;
}
long long pow2(long long a, long long n) {
  long long x = 1;
  while (n > 0) {
    if (n & 1) {
      x = x * a;
    }
    a = a * a;
    n >>= 1;
  }
  return x;
}
long long nCr(int n, int r) {
  if (r > n / 2) r = n - r;
  long long ans = 1;
  int i;
  for (i = 1; i <= r; i++) {
    ans *= n - r + i;
    ans /= i;
  }
  return ans;
}
const int MOD = 1000000007;
bool arr[1050000];
int sosuu[100010];
void Eratosthenes() {
  long long N = 1050000;
  int c = 0;
  for (int i = 0; i < N; i++) {
    arr[i] = 1;
  }
  for (int i = 2; i < sqrt(N); i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < N; j++) {
        arr[i * (j + 2)] = 0;
      }
    }
  }
  for (int i = 2; i < N; i++) {
    if (arr[i]) {
      sosuu[c] = i;
      c++;
    }
  }
}
int a[3010];
int main() {
  int N;
  cin >> N;
  long long Lcm = 1;
  long long ans = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    Lcm = lcm(Lcm, a[i]);
    ans += a[i] - 1;
  }
  cout << ans << endl;
  ;
}
