N = int(input()) A = tuple(map(int, input().split())) S = {0} for a in A: new_S = S.copy() for s in S: new_S.add(s ^ a) S = new_S print(len(S))