#include <bits/stdc++.h>
using namespace std;
void printv(vector<long> x) {
  for (int i = 0; i < x.size(); i++) {
    cout << x[i] << " ";
  }
  cout << endl;
}
bool simple(int x) {
  if (x == 2 || x == 3) return true;
  if (x % 2 == 0 || x == 1) return false;
  int i = 3;
  while (i <= sqrt(x)) {
    if (x % i == 0) return false;
    i += 2;
  }
  return true;
}
long fact(long x) {
  long ans = 1;
  for (int i = 1; i <= x; i++) {
    ans *= i;
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  if (n % 2 == 0)
    cout << n / 2 - 1;
  else
    cout << n / 2;
  return 0;
}
