N = int(input()) A = 0 x = [0] * 2 ** 15 x[0] = 1 for a in map(int, input().split()): for i in range(2 ** 14): if x[i]: x[i ^ a] = 1 print(sum(x))