#include <iostream>
using namespace std;
int main()
{
int X;
int sum = 64;
int current = 64;
int count = 0;
cin >> X;
while (sum > X)
{
current /= 2;
if (sum - current >= X)
{
sum -= current;
}
else
count++;
}
cout << count+1;
return 0;
}