#include <bits/stdc++.h>
using namespace std;
const int NORMAL_RUN = 0;
const int TESTING_RUN = 1;
class MaximalXorOfSegment {
  vector<unsigned int> array;
  unsigned int result;
  void prepareInternalsToWork() {
    array.clear();
    result = 0;
  }
  void resizeArray(istream& is) {
    size_t numberOfElementsInArray;
    is >> numberOfElementsInArray;
    array.resize(numberOfElementsInArray);
  }
  void loadInput(istream& is) {
    resizeArray(is);
    for (size_t element = 0; element < array.size(); ++element)
      is >> array[element];
  }
  unsigned int calculateXorOfSegment(size_t beginningOfSegment,
                                     size_t endOfSegment) {
    unsigned int xorOfSegment = 0;
    for (size_t element = beginningOfSegment; element <= endOfSegment;
         ++element)
      xorOfSegment ^= array[element];
    return xorOfSegment;
  }
  void tryToImproveWithSegment(size_t beginningOfSegment, size_t endOfSegment) {
    unsigned int xorOfSegment =
        calculateXorOfSegment(beginningOfSegment, endOfSegment);
    result = max(result, xorOfSegment);
  }
  void printOutput(ostream& os) { os << result << endl; }

 public:
  void solve(istream& is, ostream& os) {
    prepareInternalsToWork();
    loadInput(is);
    for (size_t beginningOfSegment = 0; beginningOfSegment < array.size();
         ++beginningOfSegment)
      for (size_t endOfSegment = beginningOfSegment;
           endOfSegment < array.size(); ++endOfSegment)
        tryToImproveWithSegment(beginningOfSegment, endOfSegment);
    printOutput(os);
  }
};
class MaximalXorOfSegmentTest {
  string input;
  string output;

 public:
  MaximalXorOfSegmentTest(string input, string output)
      : input(input), output(output) {}
  bool test() {
    istringstream isstream(input);
    ostringstream osstream;
    MaximalXorOfSegment solver;
    solver.solve(isstream, osstream);
    return output == osstream.str();
  }
};
class MaximalXorOfSegmentTester {
  vector<pair<string, string>> testCases;

 public:
  void addTestCase(string input, string output) {
    testCases.push_back(make_pair(input, output));
  }
  bool runTestCase(int testNumber) {
    MaximalXorOfSegmentTest testCase(testCases[testNumber].first,
                                     testCases[testNumber].second);
    return testCase.test();
  }
  bool runTestCases() {
    for (size_t testNumber = 0; testNumber < testCases.size(); ++testNumber)
      if (!runTestCase(testNumber)) return false;
    return true;
  }
};
void normalRun() {
  MaximalXorOfSegment solver;
  solver.solve(cin, cout);
}
void testingRun() {
  MaximalXorOfSegmentTester tester;
  tester.addTestCase("5 1 2 1 1 2", "3\n");
  tester.addTestCase("3 1 2 7", "7\n");
  tester.addTestCase("4 4 2 4 8", "14\n");
  tester.addTestCase("1 1", "1\n");
  tester.addTestCase("1 2", "2\n");
  tester.addTestCase("1 3", "3\n");
  tester.addTestCase("3 1 2 4", "7\n");
  tester.addTestCase("4 1 2 4 6", "7\n");
  tester.addTestCase("4 1 2 4 8", "15\n");
  tester.addTestCase("4 1 2 4 9", "15\n");
  tester.addTestCase("4 2 1 4 9", "14\n");
  cout << (tester.runTestCases() ? "OK" : "WA") << endl;
}
void run(int runType) {
  switch (runType) {
    case NORMAL_RUN:
      normalRun();
      break;
    case TESTING_RUN:
      testingRun();
      break;
  }
}
int main() { run(NORMAL_RUN); }
