#include using namespace std; int b,r; int main() { cin>>b; for(;b;++r,b&=(b-1)); }