#include <iostream>

using namespace std;

int x, rez;

int main()
{
    cin >> x;

    while(x)
        {
            if(x & 1)
                rez++;

            x = x / 2;
        }

    cout << rez;
}