#include <stdio.h>
int countSetBits(unsigned int N) {
// Write your code here
int count = 0;
while (N > 0) {
count += (N & 1); // check last bit
N = N >> 1;
}
return count;
}
int main() {
int n;
scanf("%d", &n);
printf("%d", countSetBits(n));
return 0;
}