n = int(input()) *a, = map(int,input().split()) basis = [] for e in a: for b in basis: if e > e^b: e ^= b if e: basis.append(e) print(1<