n = int(input("Enter a number"))
print(bin(n).count('1'))#include <iostream>
using namespace std;
int main() {
int n;
cout << "Enter a number";
cin >> n;
int bits = 0;
while (n > 0) {
if ((n & 1) == 1) {
bits++;
}
n >>= 1;
}
cout << bits;
}