# Odd Divisor

A function f(x) is defined as the greatest odd divisor of that number (including itself).

You are given a positive Integer N you have to find f(1)+f(2)+f(3)+.....+f(N).

**Input**

First Line contains T denoting number of Test cases.

Next T lines Each containing a positive Integer.

**Use scanf, printf for fast I/O.**

**Output**

T lines each containing a value as described in the problem statement.

**Constraints**

```
```

T<=100000

Each value of N will be <= 10^9

watchout for overflows.

**Sample Input**

2

7

1

**Sample Output**

21

1

*Problem Setter : Arjun Singh Bhatia*

*Problem Tester : Shikhar Sharad*

**Languages:**Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text