#include using namespace std; int main(){ int a; cin >> a; int x = 0; while (a != 0){ if (a % 2 != 0) { x++; } a /= 2; } cout << x; }