N = int(input()) A = list(map(int, input().split())) s = set([0]) for a in A: l = list(s) for ll in l: s.add(ll^a) print(len(s))