#include <bits/stdc++.h>
using namespace std;
long long min(long long a, long long b) {
  if (a <= b)
    return a;
  else
    return b;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n;
  cin >> n;
  ;
  long long ma = -1, ans = 0, k, arr[n + 1], m = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] > m) m = arr[i];
  }
  arr[n] = 0;
  for (int i = 0; i <= n - 1; i++) {
    k = arr[i];
    ans = max(k, ans);
    for (int j = i + 1; j <= n; j++) {
      k = k ^ arr[j];
      if (k > ma) ma = k;
    }
    ans = max(ma, ans);
    k = 0;
  }
  cout << max(m, ans);
  return 0;
}
