#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  while (scanf("%d", &n) != EOF) {
    int i;
    int x, y;
    for (i = 1; i <= n + 1; i++) scanf("%d%d", &x, &y);
    printf("%d\n", (n - 4) / 2);
  }
  return 0;
}
