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