#include <bits/stdc++.h>
using namespace std;
const int tinf = (int)1e9 + 7;
const long long inf = (long long)1e18 + 7;
const int N = 1e5 + 5;
long long n, x[10000], y[10000], ans;
int main() {
  {
    ios ::sync_with_stdio(false);
    cin.tie(0);
  }
  cin >> n;
  cout << (n - 4) / 2;
}
