#!/usr/bin/env python3 # %% import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # %% import numpy as np # %% 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 # %% N = int(readline()) A = np.array(read().split(), np.int64) # %% row_transform_over_F2(A, highest=61) # %% dim = np.count_nonzero(A) print(2 ** dim)