#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long sum = 0;
  int i = 1, j = n;
  int f = 0;
  while (i < j) {
    sum += (i + j) % (n + 1);
    if (f == 0) {
      i++;
      f = 1;
    } else {
      j--;
      f = 0;
    }
  }
  cout << sum << endl;
  return 0;
}
