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