#include using namespace std; constexpr int MAX_A = (1 << 16); int main() { int N; cin >> N; bool DP[MAX_A + 1] = {}; DP[0] = true; for (int i = 0; i < N; ++i) { int A; cin >> A; bool DP2[MAX_A + 1] = {}; for (int j = 0; j <= MAX_A; ++j) { DP2[j] = DP[j]; } for (int j = 0; j <= MAX_A; ++j) { if (DP[j]) { DP2[j ^ A] = true; } } for (int j = 0; j <= MAX_A; ++j) { DP[j] = DP2[j]; } } int ans = 0; for (int i = 0; i <= MAX_A; ++i) { ans += DP[i]; } cout << ans << endl; }