n = int(raw_input()) count = 0 while n > 0: rest = n % 2 if rest == 1: count += 1 n = n // 2 print(count)