#include <cstdio>
using namespace std;
int main()
{
    int n,s=0,c;
    scanf("%d",&n);
    while(n>0)
    {
        c=n%2;
        if(c==1)
            s++;
        n/=2;
    }
    printf("%d",s);
    return 0;
}