#include<iostream.h>
int func(int x){
int count=0;
while(x){
count ++;
x=x&(x-1);
}
return count;
}
void main(){
cout <<func(9999);
}
int func(int x){
int count=0;
while(x){
count ++;
x=x&(x-1);
}
return count;
}
void main(){
cout <<func(9999);
}