#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int n,nr=0;
    cin>>n;
    while(n)
    {
        nr+=n%2;
        n/=2;
    }
    cout<<nr;
    return 0;
}