import numpy as np def tobit(x): x = int(x) return [((x >> i) & 1) for i in range(70)] N = int(input()) A = np.array(list(map(tobit, input().split()))) x = np.linalg.matrix_rank(A) print(pow(2, x))