#include <bits/stdc++.h>
using namespace std;
struct zz {
  int x;
  int y;
} p[100010];
int main() {
  int t, n, m, i, j, k;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i <= n; i++) scanf("%d%d", &p[i].x, &p[i].y);
    printf("%d\n", (n - 4) / 2);
  }
  return 0;
}
