#include <bits/stdc++.h>
using namespace std;
bitset<40> LL2BS(long long n) {
  bitset<40> bs;
  for (int i = 0; i < 40; ++i) {
    bs[i] = (n & 1);
    n >>= 1;
  }
  return bs;
}
long long BS2LL(bitset<40> bs) {
  long long n = 0;
  for (int i = 40 - 1; i >= 0; --i) {
    n <<= 1;
    n |= bs[i];
  }
  return n;
}
class Trie {
 private:
  map<int, Trie> chd;

 public:
  void insert(const bitset<40>& bs, int pos) {
    if (pos == -1) {
      return;
    }
    chd[bs[pos]].insert(bs, pos - 1);
  }
  bitset<40> best(const bitset<40>& bs, int pos) {
    if (pos == -1) {
      return bitset<40>();
    }
    if (chd.count(!bs[pos]) > 0) {
      bitset<40> resbs = chd[!bs[pos]].best(bs, pos - 1);
      return resbs.set(pos, !bs[pos]);
    } else {
      assert(chd.count(bs[pos]) > 0);
      bitset<40> resbs = chd[bs[pos]].best(bs, pos - 1);
      return resbs.set(pos, bs[pos]);
    }
  }
};
int main() {
  Trie r;
  int n;
  cin >> n;
  long long cr = 0, cl = 0;
  vector<long long> a(n + 1, 0);
  long long max = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    cr ^= a[i];
  }
  for (int i = 0; i <= n; ++i) {
    cl ^= a[i];
    cr ^= a[i];
    r.insert(LL2BS(cl), 40 - 1);
    long long best = BS2LL(r.best(LL2BS(cr), 40 - 1));
    if (max < (best ^ cr)) max = (best ^ cr);
  }
  cout << max << endl;
  return 0;
}
