#include <bits/stdc++.h>
using namespace std;
const int con = 1e8;
static const int INF = 0x3f3f3f3f;
static const int MOD = 998244353;
int main() {
  int n;
  scanf("%d", &n);
  n--;
  cout << n / 2;
  return 0;
}
