#include using namespace std; int a, Nr; int main(){ for(scanf("%d", &a); a; a = a >> 1) Nr += a % 2; printf("%d", Nr); return 0; }