#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define PB push_back #define all(a) (a).begin(),(a).end() #define ALL(v) begin(v), end(v) #define DWN(a) (a).begin(),(a).end(), greater() #define rep(i, m) for (int i = 0; i < m; i++) #define REP(i, n, m) for (int i = n; i < m; i++) #define V vector #define VV vector #define VVV vector using namespace std; typedef long long ll; typedef pair P; const int dx[4] = { 1, 0, -1, 0 }; const int dy[4] = { 0, 1, 0, -1 }; const int inf = (int)1e9; const ll INF = (ll)1e18; const ll MOD{ (ll)1e9 + 7 }; const long double EPS = 1e-10; bool dp[5010] = {}; int main() { int n; cin >> n; dp[0] = true; rep(i, n) { int tmp; cin >> tmp; rep(j, 1 << 15) { if (dp[j]) { dp[tmp ^ j] = true; } } } int cnt = 0; rep(i, 1 << 15) { if (dp[i]) { cnt++; } } cout << cnt << endl; return 0; }