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