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.

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
for t in range(int(input())):
	n = int(input())
	print(bin(n).count('1'))


for i in range(int(input())):
	print(bin(int(input())).count('1'))


t = int(input())
for items in range(t):
	num = int(input())
	print(bin(num).count('1'))


def bin_one(temp: int):
	n = temp
	count = 0
	while n > 0:
		if n % 2 == 1:
			count += 1
		n = n // 2
	return count
t = int(input())
values = []
for _ in range(t):
	values.append(input())
for value in values:
	print(bin_one(int(value)))


import sys
T = int(input())
for t in range(T):
	N = int(sys.stdin.readline().strip())
	cnt = 0
	while N != 0:
		N = N & N - 1
		cnt += 1
	print(cnt)


t = int(input())
for i in range(t):
	N = int(input())
	print(bin(N).count('1'))


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y // gcd(x, y)
abc = 'abcdefghijklmnopqrstuvwxyz'
pi = 3.141592653589793
t = int(input())
for _ in range(t):
	n = int(input())
	bin_n = bin(n)[2:]
	print(bin_n.count('1'))


for _ in range(int(input())):
	n = int(input())
	s = bin(n)
	s = s[2:]
	print(s.count('1'))


for _ in range(int(input())):
	print(bin(int(input())).count('1'))


for _ in range(int(input())):
	n = int(input())
	b = bin(n)
	print(b.count('1'))


cases = int(input())
for _ in range(cases):
	a = int(input())
	a = bin(a)
	c = a.count('1')
	print(c)


from collections import Counter
import string
import math
import sys

def isprime(x):
	i = 2
	while i * i <= x:
		if x % i == 0:
			return 0
		i += 1
	return 1

def isSumOfKprimes(N, K):
	if N < 2 * K:
		return 0
	if K == 1:
		return isprime(N)
	if K == 2:
		if N % 2 == 0:
			return 1
		return isprime(N - 2)
	return 1
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return list(map(int, sys.stdin.readline().split()))

def makedict(var):
	return dict(Counter(var))
testcases = vary(1)
for _ in range(testcases):
	n = vary(1)
	print(bin(n)[2:].count('1'))


for i in range(int(input())):
	n = int(input())
	z = bin(n)
	l = z.count('1')
	print(l)


import sys
input = sys.stdin.readline
try:
	for _ in range(int(input())):
		n = int(input())
		ans = 0
		while n:
			if n & 1:
				ans += 1
			n = n // 2
		print(ans)
except EOFError as e:
	print(e)


for i in range(int(input())):
	n = int(input())
	b = bin(n)
	print(b.count('1'))


try:
	for _ in range(int(input())):
		n = int(input())
		print(bin(n).count('1'))
except:
	pass


for _ in range(int(input())):
	N = int(input())
	p = bin(N).count('1')
	print(p)


from sys import stdin, stdout, maxsize
from math import sqrt, log, factorial, gcd
from collections import defaultdict as D
from bisect import insort
for _ in range(int(input())):
	n = bin(int(input()))
	print(n.count('1'))


import math
from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	print(bin(n).count('1'))