#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e12;
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
const long long MAXN = 1e6 + 10;
const long long N = 2000 + 10;
const long long mod = 1e9 + 7;
int main() {
  faster();
  int n;
  cin >> n;
  if (n % 2) {
    cout << n / 2 << endl;
  } else
    cout << n / 2 - 1 << endl;
}
