//unsigned char and uint8_t are all same----both takes 8 bit only
#include<stdio.h>
#include<stdint.h>
uint8_t cou(uint8_t num){
int count =0;
while(num != 0)
{
if(num & 1 ==1){
count++;
}
num = num >> 1;
}
return count;
}
int main()
{
uint8_t num;
//int n;
scanf("%hhu", &num);
uint8_t result = cou(num);
printf("%d",result);
return 0;
}