The input contains several data sets in text format. Each data set represents a tree with the following description:
the number of nodes
the description of each node in the following format
node_identifier:(number_of_roads)![]()
...
or
node_identifier:(0)
The node identifiers are integer numbers between 0 and n-1, for n nodes;the number_of_roads in each line of input will no more than 10. Every edge appears only once in the input data.
The output should be printed on the standard output. For each given input data set, print one integer number in a single line that gives the result (the minimum number of soldiers). An example is given in the following: