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