#include using namespace std; int main() { unsigned a, b, k = 0; cin >> a; while (a) { b = a / 2; if((a-b*2)==1) k++; a = b; } cout << k; return 0; }