#include<iostream> #define lsb(x) ((x)&(-(x))) using namespace std; int a,c; int main(){ cin>>a; while(a) a-=lsb(a),c++; cout<<c; return 0; }