#include #include #include #include #include #include using namespace std; int main() { int n, in; cin >> n; set a, b; a.insert(0); for (int i = 0; i < n; i++) { cin >> in; a.insert(in); } while(a.size() != b.size()) { b = a; for (auto it1 = b.begin(); it1 != b.end(); it1++) { auto it2 = it1; it2++; for (; it2 != b.end(); it2++) { a.insert(*it1 ^ *it2); } } } cout << a.size() << endl; return 0; }