n = int(input()) a = list(map(int, input().split())) s = set([0]) for x in a: if not x in s: for y in list(s): s.add(x ^ y) print(len(s))