#include using namespace std; int main(){ int N = 0, rez = 0; cin >> N; while(N!=0 && N < 32){ if(N%2==1){ rez++; } N/=2; } cout << rez; }