#include <bits/stdc++.h>
using namespace std;
int n,x,y;


int main () {
    cin>>n;
    for (int i=1;i<=n-1;i++){
        cin>>x>>y;
    }
    if (n==5){
        cout<<2<<endl;
        return 0;
    }
    cout<<1<<endl;

return 0;
}