n = int(input()) c = n.bit_count() if c <= 1: print(0) else: print(2**c)