#include using namespace std; int x, bits; int main() { cin >> x; for (int i = 1; i <= x; i <<= 1) if (i & x) bits++; cout << bits; }