#proba1 n = input() s = 0 while n>0: s += n%2 n = n/2 print s