n=int(input()) ns=list(map(int,input().split())) ans={0} dp=[[-1]*(n+1) for i in range(n+1)] dp[0][0]=0 for i in range(n): for j in range(n): if dp[i][j] != -1: dp[i+1][j+1] = dp[i][j] ^ ns[j] dp[i][j+1] = dp[i][j] ans.add(dp[i][j] ^ ns[j]) print(len(ans))