#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int c = n / 2;
    if (c < 0) c = 0;
    if (n % 2 == 0) c--;
    printf("%d\n", c);
  }
  return 0;
}
