Krish is being a maniac and flipping everyone's binder!

Today, he is even more crazy and decides to come to school early so he can steal binders and flip them for fun.

He takes `N`

binders (`1 < N <= 10^12`

) and arranges them in a single line on the floor.

Then he walks all the way to the end of the hall flipping every second binder.

After that he walks back to the starting point and, on the way, flips every second binder that has not been flipped.

He does this until there is one binder left and then opens the binder to copy their baguette drawings:(

Given `N`

, can you find out which unlucky lad had his baguette copied?

The first line will contain N, the number of binders

In one line, output the position of the binder which Krish copies baguette from

`15`

`11`

Explanation: https://cdn.discordapp.com/attachments/628361107370803250/693270980524769420/unknown.png

- Points: 12
- Time limit: 2.0s
- Memory limit: 64.0M
- Author: ApocalypseCalculator
- Category: Classics
- Type: Advanced Math
- All Submissions Best Submissions