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