#include <bits/stdc++.h>
using namespace std;
struct Node {
  bool v = 0;
  int words, prefixes;
  Node* ch[2] = {0};
  Node() { words = prefixes = 0; }
  Node(bool nv) {
    words = prefixes = 0;
    v = nv;
  }
};
Node* trie = new Node();
void getBits(long long x, vector<bool>& bits) {
  while (x) {
    bits.push_back(x & 1);
    x >>= 1;
  }
  while (bits.size() < 40) bits.push_back(0);
}
void add(long long x) {
  vector<bool> bits;
  getBits(x, bits);
  Node* h = trie;
  for (int i = bits.size() - 1; i >= 0; i--) {
    h->prefixes++;
    if (!h->ch[bits[i]]) h->ch[bits[i]] = new Node(bits[i]);
    h = h->ch[bits[i]];
  }
  h->words++;
  h->prefixes++;
}
long long query(long long x) {
  vector<bool> bits, bits2;
  getBits(x, bits);
  Node* h = trie;
  bool v;
  for (int i = bits.size() - 1; i >= 0; i--) {
    v = !bits[i];
    if (h->ch[v])
      h = h->ch[v], bits2.push_back(v);
    else if (h->ch[!v])
      h = h->ch[!v], bits2.push_back(!v);
    else
      break;
  }
  long long val = 0;
  for (unsigned int i = 0; i < bits2.size(); i++) {
    val = (val << 1) + (long long)bits2[i];
  }
  return x ^ val;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  long long leftXor = 0, rightXor = 0, maxXor = 0;
  add(0);
  cin >> n;
  long long s[100001] = {0};
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
    leftXor ^= s[i];
  }
  for (int i = n; i >= 0; i--) {
    maxXor = max(maxXor, query(leftXor));
    rightXor ^= s[i];
    add(rightXor);
    leftXor ^= s[i];
  }
  cout << maxXor << '\n';
  flush(cout);
  return 0;
}
