MAXROO - Max and the kangaroo farm

no tags 

Max is a kangaroo farmer in Stardew Valley. Everyday, he wakes up, drinks some kangaroo milk and head to work. His daily routine is to feed the roos. Initially, his farm has N kangaroos, all hungry. Everyday, Max has all the hungry roos lined up and numbers them from 1 to K (K is the number of hungry kangaroo, K ≤ N). He will then feed all the even numbered roos. (i.e. Kangaroo number 2, 4, 8, etc.) If there are only one kangaroo, then he will feed that one. The work continues until there is no hungry roo left.

Max wants to know how many days it would take for him to finish his work. Apparently, he will start punching him when they get too hungry, but that's not our problem. Help Max find the answer to his question.

Input

- A single integer N which is the number of kangaroo in Max's farm.

(1 ≤ N ≤ 109)

Output

- An integer which is the answer

Example

Input:
9

Output:
5


Added by:LTU ComSoc
Date:2022-04-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All