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