#include <stdio.h>
#include <stdint.h>
uint8_t count_set_bits(uint8_t reg) {
// Your code here
int c=0,pos;
for(pos=7;pos>=0;pos--)
{
if(reg>>pos&1)
c++;
}
return c;
}
int main() {
uint8_t reg;
scanf("%hhu", ®);
printf("%u", count_set_bits(reg));
return 0;
}