#include <iostream>
using namespace std;

int main()
{
	int n, ct=0;
	cin>>n;
	while(n)
	{
		if(n%2==1)
			ct++;
		n>>=1;
	}
	cout<<ct;
}