#include <iostream>
using namespace std;

int main() {
    int num,n_1;
    cin >> num;
    while (num) {
        if ((num & 1) == 1){
            ++n_1;
        }
        num >>= 1; 
    }
    cout << n_1 << endl;
    return 0;
}