#include <bits/stdc++.h>
const int mx = 1e6 + 5;
using namespace std;
long long b[200051], a[200010], aa[200010], t, k, ev = 0, od = 0, tt = 0, n;
vector<int> vec[mx];
int vis[mx] = {}, edge;
long long cost[mx], l = 0, c2[mx];
bool ok = true;
int chid[mx];
void dfs(int s) {
  vis[s] = 1;
  edge++;
  if (vec[s].size() != 2) ok = false;
  for (auto i : vec[s]) {
    if (!vis[i]) dfs(i);
  }
}
int main() {
  cin >> n;
  long long ans = n / 2;
  if (n & 1) {
    cout << ans << endl;
  } else
    cout << ans - 1 << endl;
  return 0;
}
