#include<iostream>
using namespace std;
int x;
int main ()
{
cin>>x;
int nr=0;
while(x)
{
if(x&1) nr++;
x>>=1;
}
cout<<nr;
return 0;
}