#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans, sum;
  cin >> n;
  sum = n * (n + 1);
  sum >>= 1;
  ans = (sum / (n + 1));
  if (!(n & 1)) ans--;
  cout << ans << endl;
  return 0;
}
