#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int x;
    cin >> x;

    int rs = 0;
    while(x) {
        if((x&1) != 0) rs++;
        x/=2;
    }

    cout << rs << endl;

    return 0;
}