#include using namespace std; vectorG[101010]; int main(){ int N; cin>>N; int V=N; int E=N-1; for(int i=1;i<=E;i++){ int A,B; cin>>A>>B; G[A].push_back(B); G[B].push_back(A); } int answer=0; for(int i=1;i<=E;i++){ if(G[i].size()-2>=0)answer=answer+G[i].size()-2; } cout<