#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream &operator<<(ostream &cout, vector<T> &a) {
  for (size_t i = 0; i < a.size(); ++i) cout << a[i] << " ";
  return cout;
}
template <typename T>
ostream &operator<<(ostream &cout, vector<vector<T> > &a) {
  for (size_t i = 0; i < a.size(); ++i) cout << a[i] << endl;
  return cout;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  if (n == 1)
    cout << 0 << endl;
  else
    cout << (n - 2) / 2 + n % 2 << endl;
  return 0;
}
