#include <bits/stdc++.h>
using namespace std;
const long long int logx = 30;
const long long int N = 1e5 + 5;
const long long int INF = 1e18;
const long long int mod = 1e9 + 7;
const double PI = 3.14159265358979323846;
inline long long int mul(long long int a, long long int b) {
  return (a * 1ll * b) % mod;
}
inline long long int sub(long long int a, long long int b) {
  long long int c = a - b;
  if (c < 0) c += mod;
  return c;
}
inline long long int add(long long int a, long long int b) {
  long long int c = a + b;
  if (c > mod) c -= mod;
  return c;
}
template <typename T>
T power(T x, T y, long long int m) {
  T ans = 1;
  while (y > 0) {
    if (y & 1LL) ans = (ans * x) % m;
    y >>= 1ll;
    x = (x * x) % m;
  }
  return ans % m;
}
struct Trie {
  long long int cnt;
  Trie *left, *right;
};
Trie *root = NULL;
long long int n, a[N], pre[N], suf[N];
Trie *Create() {
  Trie *temp = new Trie();
  temp->cnt = 0;
  temp->left = temp->right = NULL;
  return temp;
}
void Insert(long long int val) {
  Trie *cur = root;
  for (long long int i = 43; i >= 0; i--) {
    long long int powx = pow(2LL, i);
    if (val & powx) {
      if (cur->right) {
        cur = cur->right;
        cur->cnt++;
      } else {
        cur->right = Create();
        cur = cur->right;
        cur->cnt++;
      }
    } else {
      if (cur->left) {
        cur = cur->left;
        cur->cnt++;
      } else {
        cur->left = Create();
        cur = cur->left;
        cur->cnt++;
      }
    }
  }
}
void Erase(long long int val) {
  Trie *cur = root, *prev;
  for (long long int i = 43; i >= 0; i--) {
    long long int powx = pow(2LL, i);
    if (val & powx) {
      if (cur->right) {
        prev = cur;
        cur = cur->right;
        if (cur->cnt) {
          cur->cnt--;
          if (cur->cnt == 0) {
            prev->right = NULL;
          }
        }
      }
    } else {
      if (cur->left) {
        prev = cur;
        cur = cur->left;
        if (cur->cnt) {
          cur->cnt--;
          if (cur->cnt == 0) {
            prev->left = NULL;
          }
        }
      }
    }
  }
}
long long int Query(long long int val) {
  long long int ans = 0;
  Trie *cur = root;
  for (long long int i = 43; i >= 0; i--) {
    long long int powx = pow(2LL, i);
    if (cur == NULL) {
      return ans;
    }
    if (val & powx) {
      if (cur->left) {
        cur = cur->left;
        ans |= powx;
      } else {
        cur = cur->right;
      }
    } else {
      if (cur->right) {
        cur = cur->right;
        ans |= powx;
      } else {
        cur = cur->left;
      }
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  long long int maxi = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  pre[0] = 0;
  suf[n + 1] = 0;
  for (long long int i = 1; i <= n; i++) {
    pre[i] = pre[i - 1] ^ a[i];
  }
  for (long long int i = n; i >= 1; i--) {
    suf[i] = suf[i + 1] ^ a[i];
  }
  pre[n + 1] = pre[n];
  suf[0] = suf[1];
  root = Create();
  for (long long int i = 0; i <= n + 1; i++) {
    Insert(suf[i]);
  }
  for (long long int i = 0; i <= n + 1; i++) {
    Erase(suf[i]);
    maxi = max(maxi, Query(pre[i]));
  }
  cout << maxi << endl;
}
