#include <stdio.h>

int main ( void ) {
	unsigned int a;
	scanf("%ud", &a);
	printf("%d", __builtin_popcount(a));
	return 0;
}