#include <bits/stdc++.h>
using namespace std;
bool sortmd(pair<pair<int, int>, int> &a, pair<pair<int, int>, int> &b) {
  if (a.first.first == b.first.first) return a.first.second < b.first.second;
  return a.first.first > b.first.first;
}
bool sortm(pair<long long, long long> &a, pair<long long, long long> &b) {
  return a.first < b.first;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  int t = 1;
  while (t--) {
    long long n, i, j;
    cin >> n;
    n--;
    j = n / 2;
    cout << j << endl;
  }
  return 0;
}
