''' Created on Feb 12, 2015 @author: user ''' if __name__ == '__main__': a = int(input("")) x = 0 while a != 0: if a % 2 == 1: x+=1 a = a//2 print(x)