from copy import copy N = int(input()) A = set(map(int,input().split())) Q = {0} for a in A: Q2 = set() for q in Q: x = a^q if x not in Q: Q2.add(a^q) Q |= Q2 print(len(Q))