Time limit
2s
Memory limit
128 MB
Jimin has a stick that is 64 cm long. One day, he wants a stick that is exactly X cm long. He plans to cut the original stick into smaller sticks and then glue some of them together.
The easiest way to cut a stick is to cut it in half. Jimin uses the following process.
Add up the lengths of all sticks he currently has. At first, he has only one 64 cm stick. If the sum is greater than X, repeat the following steps.
Glue all remaining sticks together to make a stick of length X cm.
Given X, determine how many sticks are glued together after this process.
The first line contains X. X is a natural number not greater than 64.
Print the number of sticks that are glued together to make X cm after the described process.