from collections import * from itertools import * from functools import * from heapq import * import sys, math input = sys.stdin.readline 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))