n,*A=map(int,open(0).read().split()) ans=[0]*16500 ans[0]=1 for a in A: for i in range(16500): if ans[i]: ans[i^a]=1 print(sum(ans))