#include <bits/stdc++.h>   struct node {     int* children;     node() {       children = new int[2];       children[0] = children[1] = -1;     }     int& operator[](int i) { return children[i]; }   };   struct trie {     std::vector<node> nodes;     int root;     trie() {       nodes.push_back(node());       root = 0;     }     void insert(long long x) {       int u = this->root;       for (int i = 41; i >= 0; --i) {         int v = ((x & (1LL << i)) ? 1 : 0);         int next = nodes[u][v];         if (next == -1) {           next = nodes[u][v] = nodes.size();           nodes.push_back(node());         }         u = next;       }     }     long long maximize(long long x) {       int u = this->root;       long long ans = 0;       for (int i = 41; i >= 0; --i) {         int cnt = 0, v;         if (nodes[u][0] != -1) {           cnt++;           v = 0;         }         if (nodes[u][1] != -1) {           cnt++;           v = 1;         }         if (cnt == 0)           return ans;         else if (cnt == 1) {           if (v) ans ^= (1LL << i);           u = nodes[u][v];         } else {           v = (x & (1LL << i) ? 1 : 0) ^ 1;           if (v) ans ^= (1LL << i);           u = nodes[u][v];         }       }       return ans;     }   };   int N;   long long partial_xor[100001];   int main() {     std::ios_base::sync_with_stdio(false);     std::cin.tie(NULL);     std::cout.tie(NULL);     std::cin >> N;     for (int i = 0; i < N; ++i) {       std::cin >> partial_xor[i];       if (i) partial_xor[i] ^= partial_xor[i - 1];     }     long long xor_sum = partial_xor[N - 1];     long long ans = xor_sum;     trie t;     for (int i = 0; i < N; ++i) {       ans = std::max(ans, partial_xor[i]);       if (i) {         ans = std::max(ans, partial_xor[i - 1] ^ xor_sum);         ans = std::max(ans, t.maximize(partial_xor[i - 1]) ^ partial_xor[i - 1]);       }       t.insert(partial_xor[i] ^ xor_sum);     }     std::cout << ans <<   n ;     return 0;   }   