import sys readline = sys.stdin.readline N = int(readline()) A = list(map(int,readline().split())) SIZE = 2 ** 15 dp = [False] * (SIZE) dp[0] = True for i in range(len(A)): newdp = dp.copy() for j in range(len(dp)): if not dp[j]: continue newdp[j ^ A[i]] = True dp = newdp print(sum(dp))