int main() { int n; cin >> n; int num = 0; while(n) { n &= (n-1); num++; } cout << num <<endl; return 0; }