import std; void main() { int N; readf("%d\n", N); auto A = readln.chomp.split.to!(int[]); bool[int] list; list[0] = true; foreach (a; A) { auto key = list.byKey; foreach (k; key) { list[k^a] = true; } } list.length.writeln; }