#include <bits/stdc++.h>
using namespace std;
int father[100001];
int rankcgy[100001];
void disjointini(int n) {
  for (int i = 0; i < n; ++i) {
    father[i] = i;
  }
}
int find(int v) { return father[v] = father[v] == v ? v : find(father[v]); }
void merge(int x, int y) {
  int a = find(x), b = find(y);
  if (rankcgy[a] < rankcgy[b]) {
    father[a] = b;
  } else {
    father[b] = a;
    if (rankcgy[b] == rankcgy[a]) {
      ++rankcgy[a];
    }
  }
}
int main() {
  int n, ans = 0;
  cin >> n;
  disjointini(n + 1);
  for (int i = 1; i <= n; i++) {
    if (i >= n + 1 - i) break;
    if (find(i) != find(n + 1 - i)) {
      merge(i, n + 1 - i);
    }
  }
  for (int i = 2; i <= n; i++) {
    if (i >= n + 2 - i) break;
    if (find(i) != find(n + 2 - i)) {
      merge(i, n + 2 - i);
      ans++;
    }
  }
  cout << ans;
  return 0;
}
