Hide

Problem A
Going Nuts

/problems/codesprintla20.goingnuts/file/statement/en/img-0001.jpg
Gray Squirrel. Photo by Connor Danylenko

Your crazy biology professor makes the outlandish claim that the number of walnuts each squirrel stores for the winter is always a power of two. If this holds true, any given squirrel on campus is able to only store $2^{i}$ nuts for any integer $i$. Given an integer $n$, find the minimum number of squirrels ($m$) needed on campus to store $n$ nuts.

Input

The only line of input contains the integer $n$ ($0 \le n \le 1\, 000\, 000$).

Output

Print an integer representing the minimum number of squirrels $m$.

Sample Input 1 Sample Output 1
5
2
Sample Input 2 Sample Output 2
128
1
Sample Input 3 Sample Output 3
500
6

Please log in to submit a solution to this problem

Log in