#include<iostream>
using namespace std;
int main()
{
    int a;
    cin>>a;
    int count=0;
    while(a!=0)
    {
        int b=a%2;
        if(b!=0)
        {
            count++;
        }
        a=a/2;

    }
    cout<<count<<endl;
 return 0;   
}