#include <bits/stdc++.h>
int max;
int modulo() {
  char row[15000];
  char *tok;
  int sum;
  int i = 0;
  fgets(row, 15000, stdin);
  tok = strtok(row, " ");
  while (tok != NULL) {
    sum += atoi(tok) - 1;
    tok = strtok(NULL, " ");
    i++;
  }
  max = sum;
  if (i == 1 || i == 0 || i > 3000) {
    max = modulo();
  }
  return max;
}
int main() {
  max = modulo();
  printf("%d\n", max);
  return 0;
}
