#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n % 2 == 0) {
    int m = n / 2;
    int x = m + n;
    int y = n + 1;
    cout << x % y << endl;
  } else {
    int m = n / 2 + 1;
    int x = m + n;
    int y = n + 1;
    cout << x % y << endl;
  }
  return 0;
}
