#include <bits/stdc++.h>
using namespace std;
const int bitnum = 40;
class TrieNode {
 public:
  long long val;
  TrieNode* child[2];
  TrieNode() {
    val = -1;
    for (int i = 0; i < 2; ++i) {
      child[i] = NULL;
    }
  }
};
class Trie {
 public:
  Trie() { root = new TrieNode(); }
  void insert(long long num) {
    TrieNode* p = root;
    int k = bitnum;
    for (int i = k; i >= 0; --i) {
      if (p == NULL) {
        p = new TrieNode();
      }
      int b = (1LL << i) & num ? 1 : 0;
      if (p->child[b] == NULL) {
        p->child[b] = new TrieNode();
      }
      p = p->child[b];
    }
    p->val = num;
  }
  bool search(long long num) {
    TrieNode* p = root;
    int k = bitnum;
    for (int i = k; i >= 0; --i) {
      if (p == NULL) {
        return false;
      }
      int b = (1LL << i) & num ? 1 : 0;
      p = p->child[b];
    }
    if (p == NULL) return false;
    return (p->val > -1);
  }
  long long MaxXor(long long num) {
    TrieNode* p = root;
    int k = bitnum;
    long long tmp = 0;
    for (int i = k; i >= 0; --i) {
      int b = (1LL << i) & num ? 1 : 0;
      if (p->child[!b]) {
        p = p->child[!b];
      } else {
        p = p->child[b];
      }
    }
    return max(num, num ^ (p->val));
  }

 private:
  TrieNode* root;
};
int main(int argc, char* argv[]) {
  int n;
  long long a;
  while (cin >> n) {
    vector<long long> nums;
    vector<long long> prefix(n, 0);
    Trie trie;
    cin >> a;
    nums.push_back(a);
    prefix[0] = a;
    long long ret = a;
    for (int i = 1; i < n; ++i) {
      cin >> a;
      nums.push_back(a);
      prefix[i] = prefix[i - 1] ^ a;
      ret = max(ret, prefix[i]);
    }
    long long tmp = prefix[n - 1];
    for (int i = 0; i < n; ++i) {
      trie.insert(prefix[i]);
      tmp ^= nums[i];
      ret = max(ret, trie.MaxXor(tmp));
    }
    cout << ret << endl;
  }
  return 0;
}
