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