#include <iostream>
using namespace std;

int main ()
{

    long N;
    cin >> N;
    
    long a, b;
    for (long i=0; i<N; i++)
        cin >> a >> b;
    
    
    cout << N-2;
    
    return 0;
}