import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random; import std.string, std.conv, std.stdio, std.typecons; void main() { auto n = readln.chomp.to!int; auto ai = readln.split.map!(to!int).array; auto memo = new bool[](2 ^^ 15); memo[0] = true; foreach (a; ai) { auto memo2 = memo.dup; foreach (i; 0..memo2.length) if (memo[i]) memo2[a ^ i] = true; memo = memo2; } writeln(memo.count!(a => a)); }