p = int(input()) print("{:b}".format(p).count('1'))