N = int(input()) A = list(map(int,input().split())) dp = set() dp.add(0) for a in A: new_dp = dp.copy() for d in dp: new_dp.add(a ^ d) dp = new_dp print(len(dp))