#include <stdio.h>
int countSetBits(unsigned int n) {
// Write your code here
int bits = sizeof(n) * 8;
int setBits = 0;
for (int i = 0; i < bits; i++) {
if (n & (1 << i)) {
setBits++;
}
}
return setBits;
}
int main() {
int n;
scanf("%d", &n);
printf("%d", countSetBits(n));
return 0;
}