Tau is Having an interview where the interviewer asks him a question and allows him to pair up with some other person in the interview room as the question itself contains PAIRS. he went to Aatish as he is mathematics Genius but Aatish participate with girls only (:-p) .Tau is a deserving candidate so he comes to you and asks for help ,you won't let him down so he asked the question as:
Given An Integer N find the total number of pairs (a,b) such that pow(a,b)>=pow(b,a) provided 1<=a<b<=N
Where , pow(x,y) denotes xy.
Constraints:
1<=t<=10^6
1<=N<=10^9
Input:
First line contains t- the number of testcases.
next t lines contains An integer N as mentioned in Problem statement.
Output:
Print the corresponding Answer to every N in a newline.
Sample Input:
2
1
4
Sample Output:
0
2
Author: Hardik Gulati