import sys input = sys.stdin.readline N=int(input()) count=0 for i in range(61): if N & (1<