#include #include using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000000000000 int main(){ int N; cin>>N; vector t(N,0); rep(i,N-1){ int a,b; cin>>a>>b; a--;b--; t[a]++; t[b]++; } int ans = -2; rep(i,N){ if(t[i]==1)ans++; } cout<