While doing his research in the Institute of Lovely Graphs, Rashad came up with another problem called Prime Graph.
Prime Graph is a simple graph (undirected graph which does not contain any self-loops or multiple-edges) with nodes such that the degree of each node is prime. Rashad wants to know what is the maximum number of edges a prime graph with nodes can contain. Can you help Rashad answer this question?
Note: The degree of a node in a simple graph is the number of edges that are incident on the node and a prime number is a natural number greater than which has exactly two divisors - and the number itself.
Input Format
- The first line contains - the number of test cases. Then the test cases follow.
- The first line of each test case contains - the number of nodes in the graph.
Output Format
For each test case, output the maximum number of edges a prime graph of nodes can contain.
Constraints
Sample Input 1
3
3
4
5
Sample Output 1
3
6
7
Explanation
- For and we can construct a complete graph (a graph in which every pair of distinct vertices is connected by an edge).
- For we can construct a prime graph with at most edges. One such graph is:
ConversionConversion EmoticonEmoticon