#include <bits/stdc++.h>
using namespace std;
int n, m, x[111111], y[111111];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x[i] >> y[i];
  }
  cout << (n - 4) / 2;
  return 0;
}
