Problem Statement:

Consider a convex polygon with N vertices, with the additional property that no three diagonals intersect in a single point. Find the number of intersections between pairs of diagonals in such a polygon.

The figure below shows one such polygon with 6 vertices.

Note: a polygon is convex if all of its interior angles are less than 180 degrees.

Input Format:

The first line contains T denoting the number of test cases. T blocks follow. For each test case, there is a line containing a single integer N, 3 ≤ N ≤ 100.

Output Format:

For each test case, output the number of intersections on a single line.

Sample Input:

3
3
4
6

Sample Output:

0
1
15