#include using namespace std; int main() { long int n,c=0; cin>>n; while(x&(x-1)) { c++; x=x&(x-1); } cout<