n = int(input()) a = list(set(map(int, input().split()))) ables = set([0]) for i in a: if i in ables: continue tmp = [] for j in ables: tmp.append(j^i) ables |= set(tmp) print(len(ables))