N = int(input())
A = list(map(int,input().split()))

dp = [0] * (2 ** 14 + 1)
dp[0] = 1
dp[A[0]] = 1
for i in range(1,N):
    for j in range(2 ** 14 + 1):
        if dp[j]:
            dp[j ^ A[i]] = 1
count = 0
for i in range(2 ** 14 +1):
    if dp[i]:count += 1
print(count)