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