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