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