Count Set Bits In First N Natural Numbers
easy
1. You are given a number n. 2. You have to print the count of set bits of first n natural numbers.
Constraints
1 <= n <= 10^9
Format
Input
A number n
Output
A number
Example
Sample Input
17
Sample Output
35
Question Video