#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  set<int> S;
  for (int i = 0; i < N; i++) {
    int s;
    S.insert(s);
  }
  int ans = 0;
  for (int c : S) {
    ans += c - 1;
  }
  cout << ans << endl;
}
