Let f(n) be the greatest odd divisor of a positive integer n. Find the value of the sum:
Each line contains one positive integer n (n \leq 10^9).
For each value of n, print the value of the sum f(1) + f(2) + \dots + f(n) on a separate line.
Example 1