input() s = set() s.add(0) for a in map(int,input().split()): for b in list(s): s.add(a^b) print(len(s))