import std.stdio, std.algorithm, std.array, std.conv, std.string; bool[213805] dp; void main() { int N; readf("%d\n", &N); auto as = readln().split().map!(to!long); dp[0] = true; foreach(a; as) { dp[a^0] = true; for(int i = 16384; i >= 0; --i) { if(dp[i]){ dp[i^a] = true; } } } writeln(dp[0..$].filter!"a"().count()); }