#include <fstream>

using namespace std;

int main()
{
    ifstream f("Input");
    ofstream g("Output");
    short n,nr=0;
    f>>n;
    while(n!=0)
    {
        if(n%2==1)
        ++nr;
        n/=2;
    }
    g<<nr<<'\n';
    f.close();
    g.close();
    return 0;
}