from copy import copy N = int(input()) A = set(map(int,input().split())) Q = copy(A) while Q: Q2 = set() while Q: x = next(iter(Q)) Q.remove(x) for a in A: y = a ^ x if y not in A: if y not in Q: if y not in Q2: Q2.add(y) A |= Q2 Q2,Q = Q,Q2 print(len(A))