N = int(input()) A = list(map(int, input().split())) X = set([0]) for a in A: Y = set(X) for x in X: Y.add(x ^ a) X = set(Y) print(len(X))