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