#include <stdio.h>
int countSetBits(unsigned int n) {
// Write your code here
int RetVal = 0;
unsigned int tempN = n;
while (tempN)
{
if (tempN & 0x1) {RetVal++;}
tempN >>= 1;
}
return RetVal;
}
int main() {
int n;
scanf("%d", &n);
printf("%d", countSetBits(n));
return 0;
}