N, *A = map(int, open(0).read().split()) x = {0} for a in A: x |= {xi ^ a for xi in x} print(len(x))