#include <iostream>

using namespace std;

int main()
{
    int N, c = 0;
    cin >> N;
    while(N) {
        if(N & 1) c++;
        N >>= 1;
    }
    cout << c << "\n";
    return 0;
}