# -*- coding: utf-8 -*- N = int(input()) A = list(map(int, input().split())) #B = [] #for a in A: # B.append(format(a, '015b')) #X = 0 dp = [False] * (pow(2,14)+1) dp[0] = True def solution(i, m): # if dp[m^A[i]]: # return dp[m^A[i]] # dp[m^A[i]] = True if i<N-1: if not dp[m]: solution(i+1, m) elif not dp[m^A[i]]: solution(i+1, m^A[i]) dp[m] = True dp[m^A[i]] = True solution(0, 0) pattern = 0 for b in dp: if b: pattern += 1 print(pattern)