#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int r = (n - 2) / 2;
  if (n & 1) {
    r += ((n + 1) / 2 + 1 + (n + 1) / 2) % (n + 1);
  }
  if (n == 1) r = 0;
  cout << r << endl;
  return 0;
}
