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