#include <iostream>
using namespace std;

int main() 
{
    int i=0;
    int n=0;
    cin>>n;
    int count=0;
    while(n)
    {
        if(n%2)
        {
            count++;
        }
        n/=2;
    }
    cout<<count;
    return 0;
}