#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x;
  int y;
};
int main() {
  int n, k = 0;
  cin >> n;
  Point *P = NULL;
  P = new Point[n + 1];
  double A1, B1, A2, B2;
  for (int i = 0; i < n + 1; i++) {
    cin >> P[i].x >> P[i].y;
  }
  A1 = P[1].y - P[0].y;
  B1 = P[1].x - P[0].x;
  for (int j = 2; j < n; j++) {
    A2 = P[j].y - P[j - 1].y;
    B2 = P[j].x - P[j - 1].x;
    if (A1 / A2 != B1 / B2) {
      k++;
    }
  }
  cout << (k - 2) / 2 << "\n";
  delete[] P;
  return 0;
}
