#include using namespace std; int N; int main(){ scanf("%d", &N); int nr = 0; while(N != 0){ nr += N & 1; N >>= 1; } printf("%d\n", nr); return 0; }