{ll@n,@m;unionFind u;u.walloc(n+1,1);rep(m){ll@a,@b,@c;n-=u(a,b);}wt(n);}