M = 2**15 N = int(input()) A = list(map(int,input().split())) DP = [[0] * (M+1) for _ in range(N+1)] DP[0][0] = 1 for i in range(N): for j in range(M+1): if DP[i][j]: DP[i+1][j] = 1 DP[i+1][j^A[i]] = 1 print(sum(DP[N]))