import sys number=sys.stdin.readline() nr_of_ones=0 for char in str(bin(int(number))): if char=='1': nr_of_ones+=1 sys.stdout.write(str(nr_of_ones))