#include<bits/stdc++.h>
#define ll long long
using namespace std;
int N,tren,u1,u2,oznaka[100005];
vector<int> stablo[100005];
queue<int> BFSq,stavi;
void BFS(){
    while(BFSq.size()){
        tren=BFSq.front();
        oznaka[tren]=stavi.front();
        
    }
}
int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    cin>>N;
    if(N<=4){
        cout<<1<<endl;
        return 0;
    }
    for(int i=1;i<N;i++){
        cin>>u1>>u2;
        stablo[u1].push_back(u2);
        stablo[u2].push_back(u1);
    }
    
    return 0;
}