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