#include <iostream> int contor, n; using namespace std; int main() { cin>>n; while(n) { if(n%2) contor++; n/=2; } cout<<contor; return 0; }