#include <cstdio>
int main(){
int num, cnt=0, sh, yu;
scanf("%d", &num);
while(num != 0){
sh = num / 2;
yu = num - sh * 2;
num = sh;
if(yu == 1){
cnt++;
}
}
printf("%d", cnt);
return 0;
}

京公网安备 11010502036488号