Swap All Odd And Even Bits
easy
1. You are given a number n. 2. You have to swap all odd position bits with even position bits. 3. Every odd position bit is swapped with adjacent bit on left side. 4. Every even position bit is swapped with adjacent bit on right side. 5. Print the number formed after swapping.
Constraints
1 <= n <= 10^9
Format
Input
A number n
Output
Check the sample ouput and question video.
Example
Sample Input
10
Sample Output
5
Question Video