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