# -*- coding:utf-8 -*- if __name__ == "__main__": n = input() a = map(int,raw_input().split()) a = set(a) b = 0 new = set([0]) for i in a: if i not in new: for j in list(new): new.add(i^j) print len(new)