#include <iostream>

using namespace std;

int main(  ) {
    int n, sol= 0;
    for ( cin>>n; n; n/= 2 ) {
        if ( n%2 ) {
            ++sol;
        }
    }
    cout<<sol<<"\n";

    return 0;
}