You are given an undirected, complete graph that contains vertices. Each edge is colored in either white or black. You are required to determine the number of triplets of vertices such that the edges are of the same color.
There are white edges and black edges.
Input format
Note: The conditions and are satisfied for all .
Output format
Print an integer that denotes the number of triples that satisfy the mentioned condition.
Additional information
The triplets are: .
The graph consisting of only white edges:
The graph consisting of only black edges: