#include <bits/stdc++.h>
using namespace std;
int par[100005];
int fp(int c) {
  if (par[c] != c) return par[c] = fp(par[c]);
  return par[c];
}
int main() {
  int N;
  scanf("%d", &N);
  for (int a = 1; a <= N; a++) {
    par[a] = a;
  }
  int ret = 0;
  for (int a = 1; a <= N; a++) {
    int L = a, R = N + 1 - a;
    int p1 = fp(L), p2 = fp(R);
    if (p1 != p2) {
      par[p1] = p2;
    }
  }
  int L = 1, R = N;
  while (L != R) {
    int p1 = fp(L), p2 = fp(R);
    if (p1 == p2) {
      L++;
    } else {
      ret = ret + (L + R) % (N + 1);
      par[p1] = p2;
      R--;
    }
  }
  printf("%d\n", ret);
  return 0;
}
