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