#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
/*求一个整数储存在内存中的二进制中1的个数*/
int number;
scanf("%d", &number);
int i = 0;
int count = 0;
for (i = 0; i < 32; i++)
{
if (1 == ((number >> i) & 1))
{
count++;
}
}
printf("%d中1的个数为:%d\n", number, count);
return;
}