n = int(input()) A = list(map(int, input().split())) ans = set([0]) for i in range(n): a = A[i] ans_c = ans.copy() for ele in ans_c: ans.add(ele ^ a) print(len(ans))