#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int x[n+1];
    int y[n+1];
    for(int i=1;i<n;i++){
        cin>>x[i];
        cin>>y[i];
    }
    cout<<((n-3)/2)*2-1;
}