#include int bitCount(int n) { int contor = 0, y; while (n) { y = n & (-n); n -= y; contor++; } return contor; } int main() { int n; scanf("%d", &n); printf("%d", bitCount(n)); return 0; }