n=int(input()) connection=[[] for i in range(n)] for i in range(n): x=bin(i+1).count('1') if i-x>=0: connection[i].append(i-x) if i+x