n = int(input()) A = set(map(int, input().split())) S = set([0]) for a in A: T = set() for s in S: T.add(s ^ a) S = S | T print(len(S))