.

Triwizard tournament codechef solution

Triwizard tournament codechef solution

Gryffindor common room has a magical cauldron. It is initially empty. Any gryffindor can put any number of feathers in that cauldron every morning. The next morning, each feather grows into two feathers. Gryffindors wants exactly xx feathers in the cauldron to unlock the next riddle in the triwizard tournament. What is the minimum number of feathers they need to put in a cauldron in total to achieve this goal?

Input: Triwizard tournament codechef solution

The only line contains one integer xthenumberoffeathersx−thenumberoffeathers.

Output:

Single integer yy, where yy represents the number of total feathers put by the gryffindors in the cauldron.

Constraints

1x10000000000000000001≤ x ≤1000000000000000000

Sample Input 0: Triwizard tournament codechef solution

5

Sample Output 0:

2

Sample Input 1: Triwizard tournament codechef solution

8

Sample Output 1:

1

error: Content is Protected !!!