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