#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
vector<complex<double> > pol;
double cross(const complex<double> &a, const complex<double> &b) {
  return imag(conj(a) * b);
}
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  return cross(complex<double>(b - a), complex<double>(c - a)) > 0;
}
int cw = 0;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i <= n; i++) {
    int a, b;
    cin >> a >> b;
    pol.push_back(complex<double>(a, b));
  }
  int cw = ccw(pol[0], pol[1], pol[2]);
  int ans = 0;
  for (int i = 1; i <= n - 1; i++) {
    if (ccw(pol[i], pol[(i + 1) % n], pol[(i + 2) % n]) != cw) {
      ans++;
    }
  }
  cout << min(ans, n - ans) << endl;
}
