#!/usr/bin/python M=16384 h=[1]+[0]*(M-1) input() a=map(int,input().split()) for e in a: for i in range(M): h[e^i]|=h[i] print(sum(h))