#include <iostream>

using namespace std;

int main(){
    int x;
    cin>>x;
    short res=0;
    while(x){
        if(x&1){
            ++res;
        }
        x=x>>1;
    }
    cout<<res;
}