#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    int kordinate[n][2];
    int x,y;
    for(int i=0;i<n;++i){
        cin >> x >> y;
        kordinate[i][0] = x;
        kordinate[i][1] = y;
    }

    if(n<4){
        cout << 0;
    }
    else{
        int brtrapeza=(n-4)*2+1;
        cout << brtrapeza;
    }
    return 0;
}