#include #include #include #include #include #include #define rep(i,n) for(int i=0;i=0;i--) #define RREP(i,n) for(int i=n;i>=0;i--) #define scan(x) cin >> x #define print(x) cout << x << endl #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } using namespace std; typedef long long ll; typedef set si; typedef vector vb; typedef vector> vvb; /* Coding Space */ int max_num; int N; int A[5001]; set dp; int main(void) { fastcin; scan(N); SREP(n, 1, N) scan(A[n]); dp.insert(0); SREP(n, 1, N) { for (auto d : dp) { dp.insert(d ^ A[n]); } } print(dp.size()); return 0; }