#include using namespace std; const int MAX = 1 << 15; int dp[MAX]; int main() { ios::sync_with_stdio(false); int n, t; cin >> n; /* dp[0] = true; for (int i = 0; i < n; i++) { cin >> t; for (int j = 0; j < MAX; j++) if(dp[j]) dp[t ^ j] = true; } int ans = 0; for (int i = 0; i < MAX; i++) if(dp[i]) ans++; cout << ans << endl; */ seta; a.insert(0); for (auto i = 0; i < n; i++) { cin >> t; a.insert(t); } for (auto x : a) { for (auto y : a) { a.insert(x^y); } } cout << a.size() << endl; return 0; }