import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto n = readln.chomp.to!size_t; auto ai = readln.split.map!(to!long).array; size_t i = 0; foreach (j; 0..61) { if (i >= n) break; auto k = ai[i..$].countUntil!(a => (a & (1L << j)) != 0); if (k == -1) continue; swap(ai[i], ai[k + i]); foreach (l; i + 1..n) { if ((ai[l] & (1L << j)) != 0) ai[l] ^= ai[i]; } i += 1; } auto r = ai.count!(a => a != 0); writeln(2L ^^ r); }