input() A = map(int, input().split()) X = {0} for a in A: if a not in X: X |= {x ^ a for x in X} print(len(X))