#include <bits/stdc++.h>
using namespace std;
vector<int> primeno;
void prime() {
  for (int i = 2; i <= 3000; i++) {
    int flag = 0;
    for (int j = 2; j * j <= i; j++) {
      if (i % j == 0) {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      primeno.push_back(i);
    }
  }
}
void printarray(vector<int> arr) {
  for (int i = 0; i < arr.size(); i++) {
    cout << arr[i] << " ";
  }
  cout << "\n";
}
int main() {
  int n;
  cin >> n;
  if (n % 2 != 0) {
    cout << n / 2 << "\n";
    return 0;
  }
  cout << n / 2 - 1 << "\n";
}
