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