h=[1]+[0]*32768 input() for e in map(int,input().split()): for i in range(32768):h[e^i]|=h[i] print(sum(h))