# include <stdio.h>

int main()
{
int n,x=0;
scanf("%d",&n);
while( n )
{
if( n & 1 ) ++x;
n >>= 1;
}

printf("%d",x);

return 0;
}