#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, first, last, ans, flag;
  cin >> n;
  if (n <= 2) {
    cout << 0 << endl;
    return 0;
  }
  ans = flag = 0;
  first = 1;
  last = n;
  for (int i = 1; i < n; i++) {
    ans += (first + last) % (n + 1);
    if (!flag) {
      first++;
      swap((first), last);
    } else {
      first--;
      swap((first), last);
    }
    flag = 1 - flag;
  }
  cout << ans << endl;
  return 0;
}
