N = int(input()) A = list(map(int, input().split())) dp = [False] * 16385 dp[0] = True for i in range(16385): for j in range(N - 1, -1, -1): if dp[i]: dp[i ^ A[j]] = True print(dp.count(True))