#include <stdio.h>

int main ()
{
	int n;
	scanf ("%d", &n);
	
	int x = 0;
	while (n)
	{
		x += n & 1;
		n /= 2;
	}
	printf ("%d\n", x);
	return 0;
}