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