#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i G[200010]; ll dep[200010]; ll p[200010]; void dfs(ll v,ll b,ll d){ p[v]=b; dep[v]=d; for(ll i=0;i<(ll)G[v].size();i++) if(G[v][i]!=b) dfs(G[v][i],v,d+1); } int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll i,j; ll N; cin >> N; for(i=1;i> a >> b; G[a].push_back(b); G[b].push_back(a); } dfs(1,-1,0); map m; for(i=1;i<=N;i++){ m[dep[i]]++; } ll ans=0; for(i=0;i