#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int a = 0;
  for (long long i = 0; i < n; ++i) {
    if (i % 2 == 1) ++a;
  }
  if (n % 2 == 0)
    cout << a - 1 << endl;
  else
    cout << a << endl;
}
