#include <bits/stdc++.h>
using namespace std;
int qwe[10001];
pair<int, int> a[10001];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  cout << n / 2 - 2;
  return 0;
}
