#include <iostream>using namespace std;int func(int x){ int count=0; while(x) { x=x&(x-1);//与的次数就是包含1的个数 count++; } return count;}
void main(){ int x; cin>>x; cout<<func(x)<<endl; }