import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np N = int(readline()) A = np.array(read().split(),np.int32) def row_transform_over_F2(A, highest=60): for k in range(highest, -1, -1): I = np.where((A >> k) == 1)[0] if len(I) == 0: continue i = I[0] x = A[i] A ^= ((A >> k) & 1) * x A[i] = x row_transform_over_F2(A, 15) n = np.count_nonzero(A) answer = 2 ** n print(answer)