#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int main() {
  ll n;
  cin >> n;
  ll ans = 0;
  if (n % 2 == 1) {
    ans = (n + 1) / 2 - 1;
  } else {
    ans = n / 2 - 1;
  }
  cout << ans << endl;
  return 0;
}
