#include <bits/stdc++.h>
using namespace std;
int n, cost;
int main() {
  cin >> n;
  int left = 1, right = n;
  int R = 1;
  for (int i = 1; i < n; ++i) {
    cost += (left + right) % (n + 1);
    if (R == 1) {
      left++;
      R = 0;
    } else {
      right--;
      R = 1;
    }
  }
  cout << cost << '\n';
  return 0;
}
