Motu and Patlu are playing with a Magical Ball. Patlu find some interesting pattern in the motion of the ball that ball always bounce back from the ground after travelling a linear distance whose value is some power of $2$. Patlu gave Motu total distance $D$ travelled by the ball and ask him to calculate the minimum number of bounces that the ball makes before coming to rest.
-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input, single integers $D$.
- Note : Power of $2$ must be a non-negative integer. 
-----Output:-----
For each testcase, output in a single line answer, the minimum number of bounces the ball makes before coming to rest.
-----Constraints-----
- $1 \leq T \leq 10^5$
- $1$ $\leq$ $M$< $10$^18
-----Sample Input:-----
1
13 
-----Sample Output:-----
2
-----EXPLANATION:-----
# cook your dish here
import math
t=int(input())
for i in range(t):
    k=int(input())
    count=0
    temp=(int(math.log2(k)))
    for j in range(temp,-1,-1):
        if((k-(2**j))>=0):
            k=k-(2**j)
            
            count=count+1
    print(count-1)

# cook your dish here
import math
t=int(input())
for i in range(t):
    k=int(input())
    count=0
    temp=(int(math.log2(k)))
    for j in range(temp,-1,-1):
        if((k-(2**j))>=0):
            k=k-(2**j)
            
            count=count+1
    print(count-1)
