Given a positive integer N, calculate the sum of all prime numbers between 1 and N(inclusive).
The first line of input contains an integer T denoting the number of test cases. T testcases follow. Each testcase contains one line of input containing N.
For each testcase, in a new line, print the sum of all prime numbers between 1 and N.
1 ≤ T ≤ 100
1 ≤ N ≤ 106