#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const int MX = 1e7 + 123;
int arr[MX];
int brr[MX];
int crr[MX];
void array_sort(int arr[], int n) {
  int temp = 0;
  for (int i = 0; i <= n - 2; i++) {
    for (int j = i + 1; j < n; j++) {
      if (arr[i] > arr[j]) {
        temp = arr[i];
        arr[i] = arr[j];
        arr[j] = temp;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  cout << (n - 1) / 2 << '\n';
  return 0;
}
