#include using namespace std; int main() { int N; cin >> N; vector dp((1 << 14) + 1); dp[0] = true; int res = 1; for (int i = 0, a; i < N; i++) { cin >> a; auto tdp = dp; for (int j = 0; j <= 1 << 14; j++) { if (tdp[j] && (j ^ a) <= (1 << 14) && !dp[j ^ a]) { dp[j ^ a] = true; res++; } } } cout << res << endl; return 0; }