import sys while True: try: num = int(input()) b = f"{num:b}" cnt = b.count("1") print(cnt) except: break