#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int MAXN = 1000100, MAXK = 30;
const long long INF = 1e17;
const long double PI = asin(1) * 2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  cout << ((n - 4) / 2) << "\n";
  return 0;
}
