Chef solved so many hard questions, now he wants to solve some easy problems for refreshment. Chef asks Cheffina for the new question. Cheffina challanges the chef to print the total number of 1's in the binary representation of N(natural number).

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains a single line of input, $N$. 

-----Output:-----
For each test case, output in a single line answer.

-----Constraints-----
- $1 \leq T \leq 10^6$
- $1 \leq N \leq 10^6$

-----Sample Input:-----
2
2
5

-----Sample Output:-----
1
2

-----EXPLANATION:-----
For 1) Binary representation of 2 is 10. i.e. only one 1 present in it.
For 2) Binary representation of 5 is 101, i.e. two 1's present in it.

```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 = "# cook your dish here\nfrom collections import Counter\nimport string\nimport math\nimport sys\n# sys.setrecursionlimit(10**6) \ndef isprime(x): \n      \n    # check for numbers from 2 \n    # to sqrt(x) if it is divisible \n    # return false \n    i = 2\n    while(i * i <= x): \n        if (x % i == 0): \n            return 0\n        i+=1\n    return 1\ndef isSumOfKprimes(N, K): \n      \n    # N < 2K directly return false \n    if (N < 2 * K): \n        return 0\n  \n    # If K = 1 return value depends \n    # on primality of N \n    if (K == 1): \n        return isprime(N) \n  \n    if (K == 2): \n          \n        # if N is even directly \n        # return true; \n        if (N % 2 == 0): \n            return 1\n  \n        # If N is odd, then one  \n        # prime must be 2. All  \n        # other primes are odd \n        # and cannot have a pair \n        # sum as even. \n        return isprime(N - 2)\n      \n  \n    # If K >= 3 return true; \n    return 1\nfrom fractions import Fraction\ndef array_int():\n    return [int(i) for i in sys.stdin.readline().split()]\ndef vary(arrber_of_variables):\n    if arrber_of_variables==1:\n        return int(sys.stdin.readline())\n    if arrber_of_variables>=2:\n        return list(map(int,sys.stdin.readline().split())) \ndef makedict(var):\n    return dict(Counter(var))\ntestcases=vary(1)\n\nfor _ in range(testcases):\n    n=vary(1)\n    print(bin(n)[2:].count('1'))\n    \n    \n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14809