#include <bits/stdc++.h>
typedef long long LL;
const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;
int n;
int main() {
  scanf("%d", &n);
  if (n & 1)
    printf("%d\n", n / 2);
  else
    printf("%d\n", n / 2 - 1);
  return 0;
}
