#include int main() { int x, db = 0; scanf("%d", &x); while (x != 0) { db += x%2; x = x/2; } printf("%d", db); return 0; }