#include <bits/stdc++.h>
using namespace std;
int n, l, r, ans;
int main() {
  cin >> n;
  l = 1;
  r = n;
  while (l < r) {
    ans += min((r + r - 1) % (n + 1),
               min((l + l + 1) % (n + 1),
                   min((l + r - 1) % (n + 1), (r + l + 1) % (n + 1))));
    ++l;
    --r;
  }
  cout << ans;
  return 0;
}
