#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 1;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 7;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) printf("%d\n", (n - 1) / 2);
  return 0;
}
