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