#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MAX = 1000005;
int SetBit(int n, int x) { return n | (1 << x); }
int ClearBit(int n, int x) { return n & ~(1 << x); }
int ToggleBit(int n, int x) { return n ^ (1 << x); }
int CheckBit(int n, int x) { return (bool)(n & (1 << x)); }
int main(void) {
  int n;
  while (scanf("%d", &n) != EOF) {
    if (n & 1)
      printf("%d\n", (n >> 1));
    else
      printf("%d\n", (n >> 1) - 1);
  }
  return 0;
}
