#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > a[100010];
vector<int> ans;
string s, s1, s2;
int n, m;
int v, e, p, q;
int main() {
  cin >> n;
  if (n == 2) {
    cout << 0;
    return 0;
  }
  int ans = n / 2 - 1;
  if (n % 2) ans++;
  cout << ans;
}
