#include using namespace std; int main() { int a; cin >> a; if (a < 0 || a >= 32) { cout << "Error"; } else { int b = 0; while (a) { b += a % 2; a /=2; } cout << b; } return 0; }