#P2385. anthill

anthill

题目描述

There is an anthill in the forest of Qilu University of Technology, one day the dreadful Zheng Bo Wei (a very bad, very bad man) wants to destroy them, but he does not want to end the exploration at once, we define this anthill as having many rooms, represented by numbers, now Zheng Bo Wei wants to destroy the most rooms, each pair of rooms will be connected by a road, please help the ants to calculate how many rooms Number of anthill rooms destroyed by Zheng Bovi (so bad OwO)

输入格式

A number represents an anthill colony and the following numbers (n-1) represent the number of connected roads and anthill rooms

输出格式

Number of anthill rooms destroyed by Zheng Bovi

样例

6 
5 1 6 
1 4 5 
6 3 9 
2 6 8 
6 1 7
22

提示

By TOP

There are two groups of test samples, one small sample and one large sample

Data range less than 10,000