N = input() A = map(int, raw_input().strip().split()) dp = set([0]) for a in A: for x in list(dp): if a ^ x not in dp: dp.add(a ^ x) print(len(dp))