#include <bits/stdc++.h>   using namespace std;   int main() {     long long int p, c = 0;     cin >> p;     long long int x = p;     long long int n = std::numeric_limits<int>::digits - 1;     std::string s;     s.reserve(n + 1);     do s.push_back(((x >> n) & 1) +  0 );     while (--n > -1);     for (auto x : s)       if (x ==  1 ) c++;     cout << c;     return 0;   }   