#include <stdio.h>
int countSetBits(unsigned int n)
{
int count=0;
//It is one of the efficient way to count number of set bits.
while(n)
{
n=n&(n-1);
count++;
}
return count;
}
int main() {
int n;
scanf("%d", &n);
printf("%d", countSetBits(n));
return 0;
}