#include<iostream>

int main(){
	int n;
	std::cin >> n;
	int s = n & 1;
	while (n>>=1)
	{
		s += n & 1;
	}
	std::cout << s;
}