#include <stdio.h>
int countSetBits(unsigned int n) {
// Write your code here
int pos=31,count;
for(pos=31,count=0;pos>=0;pos--) //checking set and clear bit
{
if(n>>pos&1)
count++;
}
return count;
}
int main() {
int n;
scanf("%d", &n);
printf("%d", countSetBits(n));
return 0;
}