#include <iostream> using namespace std; int main() { int number; int count=0; cin>>number; while(number>1){ if(number%2==1)count++; number/=2; } cout<<count+1; } // 64 位输出请用 printf("%lld")