N =int(input()) pa=[int(x) for x in input().split()] sa={0} for n in pa: if n in sa: continue sa|={n^a for a in sa} print(len(sa))