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.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '\'\'\'\r\n    Auther: ghoshashis545 Ashis Ghosh\r\n    College: jalpaiguri Govt Enggineering College\r\n\r\n\'\'\'\r\nfrom os import path\r\nimport sys\r\nfrom heapq import heappush,heappop\r\nfrom functools import cmp_to_key as ctk\r\nfrom collections import deque,defaultdict as dd \r\nfrom bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right\r\nfrom itertools import permutations\r\nfrom datetime import datetime\r\nfrom math import ceil,sqrt,log,gcd\r\ndef ii():return int(input())\r\ndef si():return input().rstrip()\r\ndef mi():return map(int,input().split())\r\ndef li():return list(mi())\r\nabc=\'abcdefghijklmnopqrstuvwxyz\'\r\nmod=1000000007\r\n# mod=998244353\r\ninf = float("inf")\r\nvow=[\'a\',\'e\',\'i\',\'o\',\'u\']\r\ndx,dy=[-1,1,0,0],[0,0,1,-1]\r\n\r\ndef bo(i):\r\n    return ord(i)-ord(\'a\')\r\n\r\nfile=1\r\n\r\n\r\n\r\n\r\n\r\n    \r\ndef solve():\r\n\r\n    for _ in range(ii()):\r\n        \r\n        n = ii()\r\n        x = n//2\r\n        c = int(sqrt(x))\r\n        print(2*c)\r\n\r\n\r\n        \r\ndef __starting_point():\r\n\r\n    if(file):\r\n\r\n        if path.exists(\'input.txt\'):\r\n            sys.stdin=open(\'input.txt\', \'r\')\r\n            sys.stdout=open(\'output.txt\',\'w\')\r\n        else:\r\n            input=sys.stdin.readline\r\n    solve()\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 366571