#!/usr/bin/python from collections import defaultdict h={0} input() a=map(int,input().split()) for e in a: b=[] for f in h:b.append(f^e) for f in b:h.add(f) print(len(h))