#include #include #include using namespace std; int main() { int n; cin >> n; std::string result = std::bitset<32>(n).to_string(); int total = 0; for(int i = 0; i < result.size(); i++) if(result[i] == '1') total++; cout << total << endl; }