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