#include <bits/stdc++.h>
using namespace std;
long long arr[100100], n, ans, temp;
int main() {
  cin >> n;
  if (n == 1)
    cout << "0" << endl;
  else
    cout << (n - 1) / 2 << endl;
  return 0;
}
