Nandu and Rani (husband and wife) live in a city consisting of N houses (1, 2, 3, ... , N) and N-1 roads, each road being of length 1 Km and connecting some 2 houses. Moreover, every house is connected to at least one other house. Nandu and Rani live in house 1.
Nandu is really hungry and wants to eat Vada Pav. Rani, being a caring wife, doesn't want Nandu to spoil his own health. So, she has placed one Vada Pav in each and every house of the city. Nandu has to walk all over the city if he wants to eat those Vada Pavs. Nandu really likes Vada Pavs and decides to eat all of them. However, he doesn't like walking. So he decides he will stay back in the house in which he eats the last Vada Pav.
What is the minimum distance (in Km) Nandu has to travel to eat all the Vada Pavs ?