N = int(input()) A = list(map(int,input().split())) MAX = 40000 dp = [False] * MAX dp[0] = True for i in range(N): tmp = dp[::] for j in range(MAX): if not tmp[j]: continue dp[j] = True dp[j^A[i]] = True print(sum(dp))