import sys stdin=sys.stdin ip=lambda: int(sp()) fp=lambda: float(sp()) lp=lambda:list(map(int,stdin.readline().split())) tp=lambda:tuple(map(int,stdin.readline().split())) sp=lambda:stdin.readline().rstrip() yp=lambda:print('Yes') np=lambda:print('No') n=ip() a=lp() dp0=[-1 for _ in range(2**14+1)] dp1=[-1 for _ in range(2**14+1)] dp0[0][0]=0 for i in range(n): for j in range(2**14+1): if dp0[i][j]!=-1: dp1[i+1][j]=1 dp1[i+1][j^a[i]]=1 dp0=dp1 dp1=[-1 for _ in range(2**14+1)] ans=0 for u in range(2**14+1): if dp[-1][u]!=-1: ans+=1 print(ans)