For this Question: Given a positive integer N, we define the set A<sub>N</sub> as {1, 2, 3, ... N-1, N}. 

Find the size of the largest subset of A<sub>N</sub>, such that if x belongs to the subset, then 2x does not belong to the subset.The first line of the input contains a single integer T — the number of test cases.
Each test case consists of one line containing a single integer N.

<b>Constraints:</b>
1 ≤ T ≤ 10<sup>5</sup>
1 ≤ N ≤ 10<sup>9</sup>For each test case, print one integer — the size of the largest subset of A<sub>N</sub> satisfying the condition in the problem statement.Sample Input:
4
1
2
3
4

Sample Output:
1
1
2
3

Explanation:
For test case 4, where N = 4, the subset {1, 3, 4} is the largest subset satisfying the conditions.
1 is in the subset whereas 2 is not.
3 is in the subset whereas 6 is not.
4 is in the subset whereas 8 is not., I have written this Solution Code: import java.io.*;
import java.util.*;
public class Main  {
  static BufferedReader br;
 static long compute(long n){
 if(n==1||n==2) return 1;
 if(n==3) return 2;
 if(n%2==0){
	 long ans=(n/2);
	 return ans+compute(ans/2);
 }
 else {
	 long ans=(n+1)/2;
	 if(ans%2==1) return ans+compute(ans/2);
	 else return ans+compute((ans/2)-1);
 }
 }
  public static void main(String[] args) throws Exception
	{
		br= new BufferedReader(new InputStreamReader(System.in));
		 PrintWriter pw = new PrintWriter(System.out);
		 int t=Integer.parseInt(br.readLine());
		while(t-->0){
		 long n=Long.parseLong(br.readLine());
	      long ans=compute(n);
	      pw.println(ans);
		}
		pw.flush();
}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?