The  Chef  has bought $N$ boxes of Tiles. The number of tiles present in  $i^{th}$ box is  $i$  ($i   $ varies from $1$ to $N$) . The Chef  has two houses  with  $N$  rooms  each, whose  floors  is a square with area $(i*i)$ ,i varies from $(1....N)$. He want to distribute equal number of tiles from $i^{th}$ box to any two rooms (each room must belong to one house ) such that all tiles  of $i^ { th}$  box is used and floor of  both rooms of different houses are tiled completely.
Since chef is busy doing some other works so he wants your help to count the total number of rooms of both houses that will be tiled completely.
Note $:$ size of  each tile present in boxes has length and breadth equal to $1$. It is not mandatory to use all the boxes.
A room should be tilled completely from a single box.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains one integer $N$.

-----Output:-----
For each testcase print  the total number of rooms of both houses that will be tiled completely.

-----Constraints-----
- $1 \leq T \leq 5000$
- $1 \leq N \leq 10^{12}$

-----Sample Input:-----
1
16

-----Sample Output:-----
4

-----EXPLANATION:-----
The room $1$ and $2$ of both the houses are completely tiled.

Starter code:

Solutions:
from sys import stdin

for _ in range(int(stdin.readline())):
    n = int(stdin.readline())
    n //= 2
    k = 2 * int(n**0.5)
    print(k)


# cook your dish here
from math import sqrt
def solve(N):

    return int(sqrt(N/2)) * 2


t = int(input())

for i in range(t):
    N = int(input())
    print(solve(N))

# cook your dish here
from math import floor,sqrt
for _ in range(int(input())):
    n=int(input())

    x=floor(sqrt(n/2))
    print(x*2)

# cook your dish here
from math import floor,sqrt
for _ in range(int(input())):
    n=int(input())
    y=n/2
    x=floor(sqrt(y))
    print(x*2)

import sys
import math
import bisect
from sys import stdin,stdout
from math import gcd,floor,sqrt,log
from collections import defaultdict as dd
from bisect import bisect_left as bl,bisect_right as br

sys.setrecursionlimit(100000000)

ii     =lambda: int(input())
si     =lambda: input()
jn     =lambda x,l: x.join(map(str,l))
sl     =lambda: list(map(str,input().strip()))
mi     =lambda: list(map(int,input().split()))
mif    =lambda: list(map(float,input().split()))
lii    =lambda: list(map(int,input().split()))

ceil   =lambda x: int(x) if(x==int(x)) else int(x)+1
ceildiv=lambda x,d: x//d if(x%d==0) else x//d+1

flush  =lambda: stdout.flush()
stdstr =lambda: stdin.readline()
stdint =lambda: int(stdin.readline())
stdpr  =lambda x: stdout.write(str(x))

mod=1000000007


#main code
for _ in range(ii()):
    n=ii()
    n//=2
    a=n**(1/2)
    a=int(a)
    print(2*a)
    


from math import sqrt
t = int(input())
for _ in range(t):
  n = int(input())
  print(int(sqrt(n >> 1)) << 1)

import sys
import math
import bisect
from sys import stdin,stdout
from math import gcd,floor,sqrt,log
from collections import defaultdict as dd
from bisect import bisect_left as bl,bisect_right as br

sys.setrecursionlimit(100000000)

ii     =lambda: int(input())
si     =lambda: input()
jn     =lambda x,l: x.join(map(str,l))
sl     =lambda: list(map(str,input().strip()))
mi     =lambda: list(map(int,input().split()))
mif    =lambda: list(map(float,input().split()))
lii    =lambda: list(map(int,input().split()))

ceil   =lambda x: int(x) if(x==int(x)) else int(x)+1
ceildiv=lambda x,d: x//d if(x%d==0) else x//d+1

flush  =lambda: stdout.flush()
stdstr =lambda: stdin.readline()
stdint =lambda: int(stdin.readline())
stdpr  =lambda x: stdout.write(str(x))

mod=1000000007


#main code
for _ in range(ii()):
    n=ii()
    n//=2
    a=n**(1/2)
    a=int(a)
    print(2*a)
    


# cook your dish here
from collections import defaultdict 
import sys
import math 
import random
def get_array(): return list(map(int , sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()



for _ in range(int(input())):
    n = int(input())


    print(2*int(math.sqrt(n//2)))

#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

from math import sqrt
for _ in range(inp()):
    n = inp()
    t = int(sqrt(n//2)//1)
    print(2*t)


for _ in range(int(input())):
    n=int(input())
    n=n//2
    from math import sqrt as sq 
    
    print(2*int(sq(n)))

# cook your dish here
import math

t = int(input())
while t:
    n = int(input())
    xx = math.sqrt(n / 2);
    print(int(2 * int(xx)))
    t-= 1

t = int(input())
for _ in range(t):
	n = int(input())

	s, e = 0, n
	while s <= e:
		mid = (s+e)//2
		if n >= 2*mid*mid:
			ans = mid
			s = mid+1
		else:
			e = mid-1
	print(2*ans)	

from math import sqrt

for _ in range(int(input())):
    N = int(input()) // 2
    print(int(sqrt(N)) * 2)


import math
for _ in range(int(input())):
    n=int(input())
    n//=2
    ans=0
    ans+=int(math.sqrt(n))
    print(int(2*ans))


import math
for _ in range(int(input())):
    n=int(input())
    n//=2
    ans=0
    ans+=int(math.sqrt(n))
    print(int(2*ans))

'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input().rstrip()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
# mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file=1





    
def solve():

    for _ in range(ii()):
        
        n = ii()
        x = n//2
        c = int(sqrt(x))
        print(2*c)


        
def __starting_point():

    if(file):

        if path.exists('input.txt'):
            sys.stdin=open('input.txt', 'r')
            sys.stdout=open('output.txt','w')
        else:
            input=sys.stdin.readline
    solve()
__starting_point()

from math import sqrt
t=int(input())
for _ in range (t):
    n=int(input())
    room=int(sqrt(n//2))
    print(room*2)


# cook your dish here
import math
t=int(input())
for i in range(t):
	n=int(input())
	p=n//2
	print(math.floor(math.sqrt(p))*2)

# cook your dish here
import math
t=int(input())
for i in range(t):
	n=int(input())
	p=n//2
	print(math.floor(math.sqrt(p))*2)

import math
t=int(input())
for _ in range(t):
	n=int(input())
	z=2*int(math.sqrt(n/2))
	print(int(z))

import math
for t in range(int(input())):
    n=int(input())
    print(math.floor(math.sqrt(n//2))*2)

import math
test = int(input())
for t in range(test):
	n = int(input())
	x = int(math.sqrt(n//2))
	print(x*2)