int count_bit_one(int n)
{
int count = 0;
int i = 0;
while (n)
{
n = n & (n - 1);
count++;
}
return count;
}
int main()
{
int n = 0;
scanf("%d", &n);
int count=count_bit_one(n);
printf("%d\n", count);
return 0;
}