#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const string no = "NO", yes = "YES";
void solve();
void testcase();
long long Eps(int kol) {
  long long a = 1;
  for (int(i) = 0; i < (int)(kol); ++i) a *= 10;
  return a;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
void testcase() {
  cout << "\nTime elapsed: " << clock() / 1000 << " ms" << endl;
}
void solve() {
  int n;
  cin >> n;
  int ans = n / 2;
  if (n % 2 == 0) ans--;
  cout << ans;
}
