N =map(int,input()) pa=map(int,input().split()) sa={0} for n in pa: sa |= set([n^x for x in sa]) print(len(sa))