#include #include #define rep(i,a,b) for(i=a;i>; vector a[100001]; vector tomato; void f(int v,int p){ bool topi=false; for(auto ch:a[v]){ if(ch==p)continue; f(ch,v); if(tomato[ch])topi=true; } if(!topi)tomato[v]=true; } int main() { int n,aa,b,i; cin>>n; rep(i,0,n-1){ cin>>aa>>b; a[aa].push_back(b); a[b].push_back(aa); } tomato.assign(n,false); f(1,0); int h=0; rep(i,0,n+1){ if(tomato[i])h++; } cout<