#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; double EPS = 1e-10; int main() { vector a(1 << 15); int N; cin >> N; for (int i = 0; i < N; i++) { int A; cin >> A; vector _a = a; for (int x = 0; x < (1 << 15); x++) if (a[x]) _a[x ^ A] = true; a = _a; } int cnt = 0; for (int x = 0; x < (1 << 15); x++) if (a[x]) cnt++; cout << cnt << endl; }