#include <iostream> #include <fstream> using namespace std; int main() { int n, x = 0; cin >> n; while(n) { ++x; n&=(n-1); } cout << x << "\n"; }