#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
inline int in() {
  int x;
  cin >> x;
  return x;
}
template <class T>
void max_self(T &a, const T &b) {
  if (a < b) a = b;
}
template <class T>
void min_self(T &a, const T &b) {
  if (a > b) a = b;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int(N);
  cin >> N;
  cout << (N / 2) - (N % 2 == 0) << endl;
  return 0;
}
