N = int(input()) A = [0]+list(map(int,input().split())) dp = [[0 for _ in range(2**15)] for _ in range(N+1)] for i in range(1,N+1): dp[i][0] = 1 dp[1][A[1]] = 1 for i in range(2,N+1): for j in range(1,2**15): dp[i][j] = max(dp[i-1][j],dp[i-1][j^A[i]]) ans = 0 for j in range(2**15): ans += dp[N][j] print(ans)