#include using namespace std; #define x first #define y second typedef pair pii; typedef pair pdd; typedef long long ll; typedef unsigned long long ull; int main () { #ifndef ONLINE_JUDGE ifstream fin("C:/Users/Adrian/Documents/mc/input.txt"); #undef cin #define cin fin #endif int a; scanf("%d", &a); int bc = 0; while(a) { a = (a & (a - 1)); bc++; } cout << bc; return 0; }