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