Ana and Bob are playing a game on a tree with vertices.
First, two distinct vertices and are chosen, and the game starts with the simple path between them. The vertex is Ana's endpoint and is Bob's endpoint. The players then take turns, starting with Ana:
- On her turn, Ana must choose a neighbor of that does not lie on the current path. The path is extended to , and becomes Ana's new endpoint.
- On his turn, Bob must choose a neighbor of that does not lie on the current path. The path is extended to , and becomes Bob's new endpoint.
The player who cannot make a move loses.
Count the ordered pairs with for which Ana wins, assuming both players play optimally.
Input
The first line contains a single integer (), the number of vertices in the tree.
Each of the next lines contains two integers and (, ), meaning there is an edge between vertices and . It is guaranteed that the given edges form a tree.
Date de ieșire
Print a single integer: the number of ordered pairs for which Ana wins.
Example
stdin
5
1 3
2 3
4 3
5 1
stdout
6
Note
Ana wins for the following pairs:
- : the path is . Ana extends it to vertex . The only neighbor of is , which is already on the path, so Bob cannot move.
- : symmetric to the previous case.
- : the path is . Ana extends it to vertex . The only neighbor of is , which is already on the path, so Bob cannot move.
- : the path is . Ana extends it to vertex or , and Bob has no move from vertex .
- : symmetric to the previous case.
- : the path is . Ana extends it to vertex or , and Bob has no move from vertex .
For example, Ana loses for . The path is , and Ana's only move is to vertex . Bob then extends the path to vertex . Ana's endpoint has no neighbor outside the path, so she cannot move and loses.