N = input() A = map(int, raw_input().strip().split()) s = set([0]) for a in A: t = s.copy() for x in s: t.add(a ^ x) s = t print(len(s))