#include<iostream> using namespace std; int main(){ int a; while(cin>>a){ int count=0; while(a){ count++; a=a&(a-1); } cout<<count<<endl; } }
#include<iostream> using namespace std; int main(){ int a; while(cin>>a){ int count=0; while(a){ count++; a=a&(a-1); } cout<<count<<endl; } }