#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 5;
const int mod = (int)1e9 + 7;
int n;
inline void solve() {
  scanf("%d", &n);
  printf("%d\n", (n - 1) >> 1);
}
int tests = 1;
int main() {
  while (tests--) {
    solve();
  }
  return 0;
}
