from sys import stdin stdin.readline() x = {0} for a in map(int, stdin.readline().split()): x |= {xi ^ a for xi in x} print(len(x))