A country has N cities numbered from 1 to N and N−1 bidirectional highways. It is possible to travel from any city to any other city using only the highways.
The distance between two cities x and y is defined as the number of highways required to travel from x to y.
The governor has decided to demolish a highway and build another highway such that the largest distance between any two cities is maximized.
Find this maximum largest distance.
Your Program must read from standard input.
The first line contains an integer, N, the number of cities.
In the next N−1 lines, each line contains 2 distinct integers u and v, representing a highway connecting cities u and v.
Your program must print to standard output.
The output should contain a single integer on a single line, the new largest distance between any two cities.