There are N different streets near the 221B Baker Street. All streets are numbered from 1 to N. Detective Lestrade consults Sherlock Homes to count the no. of gangsters living in the area, with the help of Sherlock’s underground network. Sherlock finds out that the number of gangster living in a particular street is equal to the number of 1’s in the binary representation of the street number. As Mr. Lestrade is weak in arithmetic, help him to find out the number of gangsters living in the area.

**Input:**

The first line of input contains a integer T, denoting the number of test cases. The only line of each test case contains the integer N, described above.

**Output:**

For each test case output a single integer corresponding to the number of gangsters living in the area, in new line.

**Constraints:**

1<= T <=1000

1<= N <= 10^{6}

**Example:
Input:**

2

3

4

**Output:**

4

5

**Explanation:
In test case 1**

Total number of streets is 3, so Binary representation of 1,2,3 is

1-> 001, no of 1’s is 1

2-> 010, no of 1’s is 1

3-> 011, no of 1’s is 2

So the Total number of gangsters around 221B Baker Street is 4.

All Is Well | 176 |

Srinivas Chakravarth | 142 |

ioan | 131 |

praveen2809 | 116 |

Diplav Srivastava | 105 |

Lam Ngoc Pham | 405 |

All Is Well | 365 |

Divvya Sinha | 356 |

skull tone | 310 |

Prateek Gole | 309 |

akhayrutdinov | 3805 |

sanjay05 | 3366 |

Michael Riegger | 2014 |

Jasleen Kaur 2 | 2012 |

Quandray | 1933 |