n=input() a=set(map(int,raw_input().split())) x=set([0]) for i in a: for j in x.copy(): x.add(j^i) if len(x)==16384: break #print x print len(x)