443. Number of Actions Required to Defeat the Villain
Junoon desires to obtain the Brahmastra, but Shiva opposes Junoon's goal. Junoon possesses an initial power P. Shiva has the ability to perform the following actions:
- If Junoon's current power is even, it can be halved by dividing it by 2.
- If Junoon's current power is odd, it can be reduced by one.
Provide a single line containing an integer P, which represents Junoon's initial power.
Display the total number of actions required by Shiva to reduce Junoon's power to zero.