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