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