#include <iostream>
using namespace std;
int main()
{
int num_10 = 0;
int num_test = 0x01;
int result = 0;
cin >> num_10;
for (int i = 0; i < 32; i++)
{
//注意这里的括号必须加,否则优先级错误
if((num_10&num_test)!=0)
{
result++;
}
//移位后记得赋值
num_test = num_test<<1;
}
cout << result << endl;
}