N = int(input()) A = list(map(int, input().split())) limit = 2**14 DP = [[False] * (limit + 1) for _ in range(N + 1)] DP[0][0] = True for i in range(N): a = A[i] for j in range(limit + 1): if DP[i][j]: DP[i + 1][j] = True DP[i + 1][j ^ a] = True ans = DP[-1].count(True) print(ans)