#include int main() { short n; short nrOneBits = 0; scanf("%hu",&n); while(n){ nrOneBits += n%1; n /= 2; } printf("%hu",nrOneBits); return 0; }