ll n,r,u[2d5],w[2d5]; vectorv[2d5]; ll f(ll j){ ll a=w[j]=1; rep(i,v[j].size()){ ll x=v[j][i]; if(!w[x]&&f(x))a=0; } r+=a; return a; } { rd(n,u(n*2-2)); v[u[0..n*2-3]].push_back(u[(0..)^1]); f(1); wt(r); }