#include using namespace std; int main() { int n,x=0; cin >> n; while(n) { x+=n%2; x/=2; } cout << x; return 0; }