#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll=long long; using ld=long double; using P=pair; #define MOD 1000000007LL #define INF 1000000000LL #define EPS 1e-10 #define FOR(i,n,m) for(ll i=n;i<(ll)m;i++) #define REP(i,n) FOR(i,0,n) #define DUMP(a) REP(d,a.size()){cout<> g; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> n; g.resize(n); REP(i, n - 1) { ll u, v; cin >> u >> v; u--; v--; g[u].pb(v); g[v].pb(u); } ll ans = 1; REP(i,n) ans = max(ans, (ll)g[i].size()); cout << ans << endl; return 0; } /* --------------------------------------- */