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