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!(a => BigInt(a)).array; bool[BigInt] memo; memo[BigInt(0)] = true; foreach (a; ai) foreach (i; memo.byKey) memo[a ^ i] = true; writeln(memo.length); }