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