#include using namespace std; int main() { int n = 0, a; cin >> a; for (; a; a = a >> 1) n += a & 1; cout << n; return 0; }