The first line contain a single integer, denoting the number of nodes in the tree.
In the nextlines, each line contain two integers
and
, indicating that there is an edge between node
and node
.
Output an integer in a single line, indicating the number of connected components with a size of three in the tree.