#include #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, 1, 0, -1}; using namespace std; typedef long long ll; const int MAXN = 5555; int A[MAXN]; bool ok[1<<15]; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; for (int i = 0 ;i < N; i++) cin >> A[i]; ok[0] = true; for (int i = 0; i < N; i++) { for (int j = 0; j < (1<<15); j++) { if (ok[j]) { ok[j^A[i]] = true; } } } int ans = 0; for (int i = 0; i < (1<<15); i++) if (ok[i]) ans++; cout << ans << endl; return 0; }