n = int(raw_input()) k = 0 while(n!=0): if(n%2 == 1): k = k + 1 n = n/2 print k