import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Random;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextLong();

		n = 100000;
		a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = new Random().nextLong() % 1000000000000L;

		long left = xorAll(a);
		long right = 0;
		long max = 0;
		Trie<Boolean> trie = new Trie<Boolean>(null, new MutableMapFactoryForOneKeyType<Boolean>() {
			public <V> MutableMap<Boolean, V> create() {
				return new MutableMap<Boolean, V>() {
					V falseValue = null;
					V trueValue = null;
					public void clear() {
						falseValue = null;
						trueValue= null;
					}
					public boolean containsKey(Boolean key) {
						if(key)
							return trueValue != null;
						else
							return falseValue != null;
					}
					public V get(Boolean key) {
						V r = get(key, null);
						if(r == null)
							throw new RuntimeException();
						return r;
					}
					public V get(Boolean key, V def) {
						V r;
						if(key)
							r = trueValue;
						else
							r = falseValue;
						if(r != null)
							return r;
						else
							return def;
					}
					public boolean isEmpty() {
						return trueValue == null && falseValue != null;
					}
					public Iterator<MutableEntry<Boolean, V>> iterator() {
						return ConvertedDataIterable.create(keys(), new DataConverter<Boolean, MutableEntry<Boolean, V>>() {
							public MutableEntry<Boolean, V> convert(final Boolean key) {
								return new MutableEntry<Boolean, V>() {
									public Boolean getKey() {
										return key;
									}
									public V getValue() {
										return get(key);
									}
									public void setValue(V value) {
										put(key, value);
									}
								};
							}
						}).iterator();
					}
					public Iterable<Boolean> keys() {
						return FilteringIterable.create(ArrayIterable.create(false, true), new DataFilter<Boolean>() {
							public boolean isAccepted(Boolean v) {
								if(v)
									return trueValue != null;
								else
									return falseValue != null;
							}
						});
					}
					public int size() {
						return (trueValue!=null?1:0) + (falseValue!=null?1:0);
					}
					public void put(Boolean key, V value) {
						if(key)
							trueValue = value;
						else
							falseValue = value;
					}
					public void remove(Boolean key) {
						put(key, null);
					}
					public Iterable<V> values() {
						return ConvertedDataIterable.create(keys(), new DataConverter<Boolean, V>() {
							public V convert(final Boolean key) {
								return get(key);
							}
						});
					}
				};
			}
		});
		trie.add(toarray(0));
		for(int i=n; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean leftbit = (left & (1L<<j)) > 0; // TODO LongBitUtil?? ??????.
				boolean prefer = !leftbit;
				if(cur.hasChild(prefer)) {
					cur = cur.getChild(prefer);
					best |= (1<<j);
				} else {
					cur = cur.getChild(!prefer);
				}
			}
//			System.out.println("L " + left);
//			System.out.println(trie);
			max = Math.max(max, best);

			if(i-1 >= 0) {
				left ^= a[i-1];
				right ^= a[i-1];
				Array<Boolean> array = toarray(right);
				trie.add(array);
			}
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private Array<Boolean> toarray(long right) {
		boolean[] r = new boolean[64];
		for(int j=63;j>=0;j--)
			r[63-j] = (right & (1L<<j)) > 0;
		return new MutableArrayUsingBooleanArray(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt", "E4.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(10*1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class ConvertedDataIterable {

	public static <T1, T2> Iterable<T2> create(final Iterable<T1> outerIterable, final DataConverter<T1, T2> converter) {
		return new Iterable<T2>() {
			public Iterator<T2> iterator() {
				return ConvertedDataIterator.create(outerIterable.iterator(), converter);
			}
		};
	}
}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

interface DataFilter<T> {
	boolean isAccepted(T v);
}

class FilteringIterable {

	public static <T> Iterable<T> create(final Iterable<? extends T> original, final DataFilter<T> filter) {
		return new Iterable<T>() {
			public Iterator<T> iterator() {
				return new ReadOnlyIterator<T>() {

					Iterator<? extends T> cursor = original.iterator();
					boolean hasNext = false;
					T next;

					public boolean hasNext() {
						ensureNext();
						return hasNext;
					}

					public T next() {
						ensureNext();
						hasNext = false;
						return next;
					}

					private void ensureNext() {
						if(!hasNext) {
							while(cursor.hasNext()) {
								T value = cursor.next();
								if(filter.isAccepted(value)) {
									next = value;
									hasNext = true;
									break;
								}
							}
						}
					}
				};
			}
		};
	}
}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

class ArrayIterable {

	public static <T> Iterable<T> create(final T... data) {
		return ConvertedDataIterable.create(Range.zeroTo(data.length), new DataConverter<Integer, T>() {
			public T convert(Integer v) {
				return data[v];
			}
		});
	}

}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

class MutableArrayUsingBooleanArray implements MutableArray<Boolean> {

	// TODO static createor�� �ٲٱ�.

	private final boolean[] a;
	private final int n;

	public MutableArrayUsingBooleanArray(boolean[] a) {
		this.a = a;
		n = a.length;
	}

	public MutableArrayUsingBooleanArray(boolean[] a, int n) {
		this.a = a;
		this.n = n;
	}

	public Boolean get(int i) {
		return a[i];
	}

	public void set(int i, Boolean v) {
		a[i] = v;
	}

	public int size() {
		return n;
	}

	public final boolean isEmpty() {
		return size() == 0;
	}

	public final Iterator<Boolean> iterator() {
		return ArrayIterator.create(this);
	}

	public final String toString() {
		return IterableToString.toString(this);
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

interface MutableEntry<K, V> {
	// TODO �̰͵� �׳� Entry�� �־�� �ұ�?
	K getKey();
	V getValue();
	void setValue(V v);
}

interface MutableMap<K, V> extends Collection<MutableEntry<K, V>> {
	// TODO ���������̽� �̱�.
	void clear();
	void put(K key, V value);
	void remove(K key);
	boolean containsKey(K key);
	V get(K key);
	V get(K key, V def);
	Iterable<V> values();
	Iterable<K> keys();
}

interface MutableMapFactoryForOneKeyType<K> {
	<V> MutableMap<K, V> create();
}

class Trie<T> {

	private TrieNodeFactory<T> nodeFactory;
	private MutableMapFactoryForOneKeyType<T> mapFactory;

	private final TrieNode<T> root;

	public Trie(TrieNodeFactory<T> nodeFactory, MutableMapFactoryForOneKeyType<T> mapFactory) {
		this.nodeFactory = nodeFactory;
		this.mapFactory = mapFactory;
		root = new GenericTrieNode<T>(mapFactory);
	}

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = new GenericTrieNode<T>(mapFactory);
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		toString(root, 0, sb);
		return sb.toString();
	}

	private void toString(TrieNode<T> node, int level, StringBuilder sb) {
		for(T c : node.getEdges()) {
			for(@SuppressWarnings("unused") int i : Range.zeroTo(level))
				sb.append(" ");
			sb.append(c + "\n");
			toString(node.getChild(c), level+1, sb);
		}
	}

}

class GenericTrieNode<T> implements TrieNode<T> {

	private final MutableMap<T, TrieNode<T>> children;

	public GenericTrieNode(MutableMapFactoryForOneKeyType<T> mapFactory) {
		children = mapFactory.create();
	}

	public boolean hasChild(T ch) {
		return children.containsKey(ch);
	}

	public TrieNode<T> getChild(T ch, TrieNode<T> def) {
		TrieNode<T> r = children.get(ch, null);
		if(r != null)
			return r;
		else
			return def;
	}

	public void putChild(T ch, TrieNode<T> node) {
		children.put(ch, node);
	}

	public int getChildCount() {
		return children.size();
	}

	public TrieNode<T> getChild(T ch) {
		return children.get(ch);
	}

	public Iterable<T> getEdges() {
		return children.keys();
	}

}

interface TrieNode<T> {
	int getChildCount();
	boolean hasChild(T ch);
	TrieNode<T> getChild(T ch, TrieNode<T> def);
	TrieNode<T> getChild(T ch);
	Iterable<T> getEdges();
	void putChild(T ch, TrieNode<T> node);
}

interface TrieNodeFactory<T> {
	TrieNode<T> create();
}


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Random;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextLong();

//		n = 100000;
//		a = new long[n];
//		for(int i : Range.zeroTo(n))
//			a[i] = new Random().nextLong() % 1000000000000L;

		long left = xorAll(a);
		long right = 0;
		long max = 0;
		Trie<Boolean> trie = new Trie<Boolean>(null, new MutableMapFactoryForOneKeyType<Boolean>() {
			public <V> MutableMap<Boolean, V> create() {
				return new MutableMap<Boolean, V>() {
					V falseValue = null;
					V trueValue = null;
					public void clear() {
						falseValue = null;
						trueValue= null;
					}
					public boolean containsKey(Boolean key) {
						if(key)
							return trueValue != null;
						else
							return falseValue != null;
					}
					public V get(Boolean key) {
						V r = get(key, null);
						if(r == null)
							throw new RuntimeException();
						return r;
					}
					public V get(Boolean key, V def) {
						V r;
						if(key)
							r = trueValue;
						else
							r = falseValue;
						if(r != null)
							return r;
						else
							return def;
					}
					public boolean isEmpty() {
						return trueValue == null && falseValue != null;
					}
					public Iterator<MutableEntry<Boolean, V>> iterator() {
						return ConvertedDataIterable.create(keys(), new DataConverter<Boolean, MutableEntry<Boolean, V>>() {
							public MutableEntry<Boolean, V> convert(final Boolean key) {
								return new MutableEntry<Boolean, V>() {
									public Boolean getKey() {
										return key;
									}
									public V getValue() {
										return get(key);
									}
									public void setValue(V value) {
										put(key, value);
									}
								};
							}
						}).iterator();
					}
					public Iterable<Boolean> keys() {
						return FilteringIterable.create(ArrayIterable.create(false, true), new DataFilter<Boolean>() {
							public boolean isAccepted(Boolean v) {
								if(v)
									return trueValue != null;
								else
									return falseValue != null;
							}
						});
					}
					public int size() {
						return (trueValue!=null?1:0) + (falseValue!=null?1:0);
					}
					public void put(Boolean key, V value) {
						if(key)
							trueValue = value;
						else
							falseValue = value;
					}
					public void remove(Boolean key) {
						put(key, null);
					}
					public Iterable<V> values() {
						return ConvertedDataIterable.create(keys(), new DataConverter<Boolean, V>() {
							public V convert(final Boolean key) {
								return get(key);
							}
						});
					}
				};
			}
		});
		trie.add(toarray(0));
		for(int i=n; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean leftbit = (left & (1L<<j)) > 0; // TODO LongBitUtil?? ??????.
				boolean prefer = !leftbit;
				if(cur.hasChild(prefer)) {
					cur = cur.getChild(prefer);
					best |= (1L<<j);
				} else {
					cur = cur.getChild(!prefer);
				}
			}
//			System.out.println("L " + left);
//			System.out.println(trie);
			max = Math.max(max, best);

			if(i-1 >= 0) {
				left ^= a[i-1];
				right ^= a[i-1];
				Array<Boolean> array = toarray(right);
				trie.add(array);
			}
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private Array<Boolean> toarray(long right) {
		boolean[] r = new boolean[64];
		for(int j=63;j>=0;j--)
			r[63-j] = (right & (1L<<j)) > 0;
		return new MutableArrayUsingBooleanArray(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt", "E4.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class ConvertedDataIterable {

	public static <T1, T2> Iterable<T2> create(final Iterable<T1> outerIterable, final DataConverter<T1, T2> converter) {
		return new Iterable<T2>() {
			public Iterator<T2> iterator() {
				return ConvertedDataIterator.create(outerIterable.iterator(), converter);
			}
		};
	}
}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

interface DataFilter<T> {
	boolean isAccepted(T v);
}

class FilteringIterable {

	public static <T> Iterable<T> create(final Iterable<? extends T> original, final DataFilter<T> filter) {
		return new Iterable<T>() {
			public Iterator<T> iterator() {
				return new ReadOnlyIterator<T>() {

					Iterator<? extends T> cursor = original.iterator();
					boolean hasNext = false;
					T next;

					public boolean hasNext() {
						ensureNext();
						return hasNext;
					}

					public T next() {
						ensureNext();
						hasNext = false;
						return next;
					}

					private void ensureNext() {
						if(!hasNext) {
							while(cursor.hasNext()) {
								T value = cursor.next();
								if(filter.isAccepted(value)) {
									next = value;
									hasNext = true;
									break;
								}
							}
						}
					}
				};
			}
		};
	}
}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

class ArrayIterable {

	public static <T> Iterable<T> create(final T... data) {
		return ConvertedDataIterable.create(Range.zeroTo(data.length), new DataConverter<Integer, T>() {
			public T convert(Integer v) {
				return data[v];
			}
		});
	}

}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

class MutableArrayUsingBooleanArray implements MutableArray<Boolean> {

	// TODO static createor�� �ٲٱ�.

	private final boolean[] a;
	private final int n;

	public MutableArrayUsingBooleanArray(boolean[] a) {
		this.a = a;
		n = a.length;
	}

	public MutableArrayUsingBooleanArray(boolean[] a, int n) {
		this.a = a;
		this.n = n;
	}

	public Boolean get(int i) {
		return a[i];
	}

	public void set(int i, Boolean v) {
		a[i] = v;
	}

	public int size() {
		return n;
	}

	public final boolean isEmpty() {
		return size() == 0;
	}

	public final Iterator<Boolean> iterator() {
		return ArrayIterator.create(this);
	}

	public final String toString() {
		return IterableToString.toString(this);
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

interface MutableEntry<K, V> {
	// TODO �̰͵� �׳� Entry�� �־�� �ұ�?
	K getKey();
	V getValue();
	void setValue(V v);
}

interface MutableMap<K, V> extends Collection<MutableEntry<K, V>> {
	// TODO ���������̽� �̱�.
	void clear();
	void put(K key, V value);
	void remove(K key);
	boolean containsKey(K key);
	V get(K key);
	V get(K key, V def);
	Iterable<V> values();
	Iterable<K> keys();
}

interface MutableMapFactoryForOneKeyType<K> {
	<V> MutableMap<K, V> create();
}

class Trie<T> {

	private TrieNodeFactory<T> nodeFactory;
	private MutableMapFactoryForOneKeyType<T> mapFactory;

	private final TrieNode<T> root;

	public Trie(TrieNodeFactory<T> nodeFactory, MutableMapFactoryForOneKeyType<T> mapFactory) {
		this.nodeFactory = nodeFactory;
		this.mapFactory = mapFactory;
		root = new GenericTrieNode<T>(mapFactory);
	}

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = new GenericTrieNode<T>(mapFactory);
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		toString(root, 0, sb);
		return sb.toString();
	}

	private void toString(TrieNode<T> node, int level, StringBuilder sb) {
		for(T c : node.getEdges()) {
			for(@SuppressWarnings("unused") int i : Range.zeroTo(level))
				sb.append(" ");
			sb.append(c + "\n");
			toString(node.getChild(c), level+1, sb);
		}
	}

}

class GenericTrieNode<T> implements TrieNode<T> {

	private final MutableMap<T, TrieNode<T>> children;

	public GenericTrieNode(MutableMapFactoryForOneKeyType<T> mapFactory) {
		children = mapFactory.create();
	}

	public boolean hasChild(T ch) {
		return children.containsKey(ch);
	}

	public TrieNode<T> getChild(T ch, TrieNode<T> def) {
		TrieNode<T> r = children.get(ch, null);
		if(r != null)
			return r;
		else
			return def;
	}

	public void putChild(T ch, TrieNode<T> node) {
		children.put(ch, node);
	}

	public int getChildCount() {
		return children.size();
	}

	public TrieNode<T> getChild(T ch) {
		return children.get(ch);
	}

	public Iterable<T> getEdges() {
		return children.keys();
	}

}

interface TrieNode<T> {
	int getChildCount();
	boolean hasChild(T ch);
	TrieNode<T> getChild(T ch, TrieNode<T> def);
	TrieNode<T> getChild(T ch);
	Iterable<T> getEdges();
	void putChild(T ch, TrieNode<T> node);
}

interface TrieNodeFactory<T> {
	TrieNode<T> create();
}


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Random;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextLong();

		n = 100000;
		a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = new Random().nextLong() % 1000000000000L;

		long left = xorAll(a);
		long right = 0;
		long max = 0;
		Trie<Boolean> trie = Trie.create();
		trie.add(toarray(0));
		for(int i=n; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean leftbit = (left & (1L<<j)) > 0; // TODO LongBitUtil?? ??????.
				boolean prefer = !leftbit;
				if(cur.hasChild(prefer)) {
					cur = cur.getChild(prefer);
					best |= (1<<j);
				} else {
					cur = cur.getChild(!prefer);
				}
			}
//			System.out.println("L " + left);
//			System.out.println(trie);
			max = Math.max(max, best);

			if(i-1 >= 0) {
				left ^= a[i-1];
				right ^= a[i-1];
				Array<Boolean> array = toarray(right);
				trie.add(array);
			}
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private Array<Boolean> toarray(long right) {
		boolean[] r = new boolean[64];
		for(int j=63;j>=0;j--)
			r[63-j] = (right & (1L<<j)) > 0;
		return new MutableArrayUsingBooleanArray(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt", "E4.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(10*1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

class MutableArrayUsingBooleanArray implements MutableArray<Boolean> {

	// TODO static createor�� �ٲٱ�.

	private final boolean[] a;
	private final int n;

	public MutableArrayUsingBooleanArray(boolean[] a) {
		this.a = a;
		n = a.length;
	}

	public MutableArrayUsingBooleanArray(boolean[] a, int n) {
		this.a = a;
		this.n = n;
	}

	public Boolean get(int i) {
		return a[i];
	}

	public void set(int i, Boolean v) {
		a[i] = v;
	}

	public int size() {
		return n;
	}

	public final boolean isEmpty() {
		return size() == 0;
	}

	public final Iterator<Boolean> iterator() {
		return ArrayIterator.create(this);
	}

	public final String toString() {
		return IterableToString.toString(this);
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

class Trie<T> {

	public static <T> Trie<T> create() {
		return new Trie<T>();
	}

	private final TrieNode<T> root = TrieNode.create();

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = TrieNode.create();
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		toString(root, 0, sb);
		return sb.toString();
	}

	private void toString(TrieNode<T> node, int level, StringBuilder sb) {
		for(T c : node.getEdges()) {
			for(@SuppressWarnings("unused") int i : Range.zeroTo(level))
				sb.append(" ");
			sb.append(c + "\n");
			toString(node.getChild(c), level+1, sb);
		}
	}

}

class TrieNode<T> {

	private static final JavaHashMapFactory MF = new JavaHashMapFactory();

	public static <T> TrieNode<T> create() {
		return new TrieNode<T>();
	}

	private final MutableMap<T, TrieNode<T>> children = MF.create();

	public boolean hasChild(T ch) {
		return children.containsKey(ch);
	}

	public TrieNode<T> getChild(T ch, TrieNode<T> def) {
		TrieNode<T> r = children.get(ch, null);
		if(r != null)
			return r;
		else
			return def;
	}

	public void putChild(T ch, TrieNode<T> node) {
		children.put(ch, node);
	}

	public int getChildCount() {
		return children.size();
	}

	public TrieNode<T> getChild(T ch) {
		return children.get(ch);
	}

	public Iterable<T> getEdges() {
		return children.keys();
	}

}

class JavaHashMapFactory implements MutableMapFactory {

	public <K, V> MutableMap<K, V> create() {
		return new MutableMapWrapperForJavaMap<K, V>(new HashMap<K, V>(2));
	}

}

interface MutableMap<K, V> extends Collection<MutableEntry<K, V>> {
	// TODO ���������̽� �̱�.
	void clear();
	void put(K key, V value);
	void remove(K key);
	boolean containsKey(K key);
	V get(K key);
	V get(K key, V def);
	Iterable<V> values();
	Iterable<K> keys();
}

interface MutableEntry<K, V> {
	// TODO �̰͵� �׳� Entry�� �־�� �ұ�?
	K getKey();
	V getValue();
	void setValue(V v);
}

interface MutableMapFactory {
	<K,V> MutableMap<K,V> create();
}

class MutableMapWrapperForJavaMap<K, V> implements MutableMap<K, V> {

	private final java.util.Map<K,V> map;

	public MutableMapWrapperForJavaMap(java.util.Map<K,V> map) {
		this.map = map;
	}

	public boolean containsKey(K key) {
		return map.containsKey(key);
	}

	public V get(K key) {
		return map.get(key);
	}

	public V get(K key, V def) {
		V r = map.get(key);
		if (r != null)
			return r;
		else
			return def;
	}

	public Iterable<K> keys() {
		return map.keySet();
	}

	public void put(K key, V value) {
		map.put(key, value);
	}

	public Iterable<V> values() {
		return map.values();
	}

	public void clear() {
		map.clear();
	}

	public boolean isEmpty() {
		return map.isEmpty();
	}

	public Iterator<MutableEntry<K, V>> iterator() {
		return ConvertedDataIterator.create(map.entrySet().iterator(), new DataConverter<java.util.Map.Entry<K,V>, MutableEntry<K,V>>() {
			public MutableEntry<K, V> convert(java.util.Map.Entry<K, V> e) {
				return new EntryWrapper<K, V>(e);
			}
		});
	}

	public int size() {
		return map.size();
	}

	public void remove(K key) {
		map.remove(key);
	}

	public String toString() {
		return map.toString();
	}

	private static class EntryWrapper<K, V> implements MutableEntry<K, V>, EqualityTester<EntryWrapper<K,V>> {
		private java.util.Map.Entry<K, V> e;
		private EntryWrapper(java.util.Map.Entry<K, V> e) {
			this.e = e;
		}
		public K getKey() {
			return e.getKey();
		}
		public V getValue() {
			return e.getValue();
		}
		public void setValue(V v) {
			e.setValue(v);
		}
		public boolean equals(Object obj) {
			return StrictEqualityTester.areEqual(this, obj, this);
		}
		public boolean areEqual(EntryWrapper<K, V> o1, EntryWrapper<K, V> o2) {
			return o1.getKey().equals(o2.getKey()) && o1.getValue().equals(o2.getValue());
		}
		public int hashCode() {
			return PairHash.hash(getKey().hashCode(), getValue().hashCode());
		}
	}

}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

interface EqualityTester<T> {
	boolean areEqual(T o1, T o2);
}

class StrictEqualityTester {
	@SuppressWarnings("unchecked")
	public static <T> boolean areEqual(T me, Object you, EqualityTester<T> tester) {
		if(me == you)
			return true;
		if(you == null)
			return false;
		if(you.getClass() != me.getClass())
			return false;
		return tester.areEqual(me, (T)you);
	}
}

class PairHash {
	public static int hash(int h1, int h2) {
		return ThomasWangHash.hash64bit((((long) h1) << 32) | h2);
	}
}

class ThomasWangHash {

	// from http://www.concentric.net/~ttwang/tech/inthash.htm

	public static int hash32bit(int key) {
		key = ~key + (key << 15); // key = (key << 15) - key - 1;
		key = key ^ (key >>> 12);
		key = key + (key << 2);
		key = key ^ (key >>> 4);
		key = key * 2057; // key = (key + (key << 3)) + (key << 11);
		key = key ^ (key >>> 16);
		return key;
	}

	public static int hash64bit(long key) {
		key = (~key) + (key << 18); // key = (key << 18) - key - 1;
		key = key ^ (key >>> 31);
		key = key * 21; // key = (key + (key << 2)) + (key << 4);
		key = key ^ (key >>> 11);
		key = key + (key << 6);
		key = key ^ (key >>> 22);
		return (int) key;
	}
}


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

//	@Override
	public void solve1(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextLong();

		long max = 0;

		long left = 0;
		for(int i : Range.zeroTo(n)) {
			left ^= a[i];
			long right = 0;
			for(int j=n-1; j>i; j--) {
				right ^= a[j];

				long r = left ^ right;
				if(r == 15)
					System.out.println(r + " " + i + " " + j);
				max = Math.max(max, r);
			}
		}
		System.out.println(max);
	}

//	@Override
	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextInt();

		long left = xorAll(a);
		long right = 0;
		long max = 0;
		Trie<Boolean> trie = Trie.create();
		trie.add(tobools(0));
		for(int i=n; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean leftbit = (left & (1L<<j)) > 0; // TODO LongBitUtil?? ??????.
				boolean prefer = !leftbit;
				if(cur.hasChild(prefer)) {
					cur = cur.getChild(prefer);
					best |= (1<<j);
				} else {
					cur = cur.getChild(!prefer);
				}
			}
//			System.out.println("L " + left);
//			System.out.println(trie);
			max = Math.max(max, best);

			if(i-1 >= 0) {
				left ^= a[i-1];
				right ^= a[i-1];
				trie.add(tobools(right));
			}
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private MutableArrayUsingBooleanArray tobools(long right) {
		boolean[] r = new boolean[64];
		for(int j=63;j>=0;j--)
			r[63-j] = (right & (1L<<j)) > 0;
		return new MutableArrayUsingBooleanArray(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt", "E4.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(10*1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

class MutableArrayUsingBooleanArray implements MutableArray<Boolean> {

	// TODO static createor�� �ٲٱ�.

	private final boolean[] a;
	private final int n;

	public MutableArrayUsingBooleanArray(boolean[] a) {
		this.a = a;
		n = a.length;
	}

	public MutableArrayUsingBooleanArray(boolean[] a, int n) {
		this.a = a;
		this.n = n;
	}

	public Boolean get(int i) {
		return a[i];
	}

	public void set(int i, Boolean v) {
		a[i] = v;
	}

	public int size() {
		return n;
	}

	public final boolean isEmpty() {
		return size() == 0;
	}

	public final Iterator<Boolean> iterator() {
		return ArrayIterator.create(this);
	}

	public final String toString() {
		return IterableToString.toString(this);
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

class Trie<T> {

	public static <T> Trie<T> create() {
		return new Trie<T>();
	}

	private final TrieNode<T> root = TrieNode.create();

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = TrieNode.create();
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		toString(root, 0, sb);
		return sb.toString();
	}

	private void toString(TrieNode<T> node, int level, StringBuilder sb) {
		for(T c : node.getEdges()) {
			for(@SuppressWarnings("unused") int i : Range.zeroTo(level))
				sb.append(" ");
			sb.append(c + "\n");
			toString(node.getChild(c), level+1, sb);
		}
	}

}

class TrieNode<T> {

	public static <T> TrieNode<T> create() {
		return new TrieNode<T>();
	}

	private final MutableMap<T, TrieNode<T>> children = new JavaHashMapFactory().create();

	public boolean hasChild(T ch) {
		return children.containsKey(ch);
	}

	public TrieNode<T> getChild(T ch, TrieNode<T> def) {
		if(children.containsKey(ch))
			return children.get(ch);
		else
			return def;
	}

	public void putChild(T ch, TrieNode<T> node) {
		children.put(ch, node);
	}

	public int getChildCount() {
		return children.size();
	}

	public TrieNode<T> getChild(T ch) {
		return children.get(ch);
	}

	public Iterable<T> getEdges() {
		return children.keys();
	}

}

class JavaHashMapFactory implements MutableMapFactory {

	public <K, V> MutableMap<K, V> create() {
		return new MutableMapWrapperForJavaMap<K, V>(new HashMap<K, V>());
	}

}

interface MutableMap<K, V> extends Collection<MutableEntry<K, V>> {
	// TODO ���������̽� �̱�.
	void clear();
	void put(K key, V value);
	void remove(K key);
	boolean containsKey(K key);
	V get(K key);
	Iterable<V> values();
	Iterable<K> keys();
}

interface MutableEntry<K, V> {
	// TODO �̰͵� �׳� Entry�� �־�� �ұ�?
	K getKey();
	V getValue();
	void setValue(V v);
}

interface MutableMapFactory {
	<K,V> MutableMap<K,V> create();
}

class MutableMapWrapperForJavaMap<K, V> implements MutableMap<K, V> {

	private final java.util.Map<K,V> map;

	public MutableMapWrapperForJavaMap(java.util.Map<K,V> map) {
		this.map = map;
	}

	public boolean containsKey(K key) {
		return map.containsKey(key);
	}

	public V get(K key) {
		return map.get(key);
	}

	public Iterable<K> keys() {
		return map.keySet();
	}

	public void put(K key, V value) {
		map.put(key, value);
	}

	public Iterable<V> values() {
		return map.values();
	}

	public void clear() {
		map.clear();
	}

	public boolean isEmpty() {
		return map.isEmpty();
	}

	public Iterator<MutableEntry<K, V>> iterator() {
		return ConvertedDataIterator.create(map.entrySet().iterator(), new DataConverter<java.util.Map.Entry<K,V>, MutableEntry<K,V>>() {
			public MutableEntry<K, V> convert(java.util.Map.Entry<K, V> e) {
				return new EntryWrapper<K, V>(e);
			}
		});
	}

	public int size() {
		return map.size();
	}

	public void remove(K key) {
		map.remove(key);
	}

	public String toString() {
		return map.toString();
	}

	private static class EntryWrapper<K, V> implements MutableEntry<K, V>, EqualityTester<EntryWrapper<K,V>> {
		private java.util.Map.Entry<K, V> e;
		private EntryWrapper(java.util.Map.Entry<K, V> e) {
			this.e = e;
		}
		public K getKey() {
			return e.getKey();
		}
		public V getValue() {
			return e.getValue();
		}
		public void setValue(V v) {
			e.setValue(v);
		}
		public boolean equals(Object obj) {
			return StrictEqualityTester.areEqual(this, obj, this);
		}
		public boolean areEqual(EntryWrapper<K, V> o1, EntryWrapper<K, V> o2) {
			return o1.getKey().equals(o2.getKey()) && o1.getValue().equals(o2.getValue());
		}
		public int hashCode() {
			return PairHash.hash(getKey().hashCode(), getValue().hashCode());
		}
	}

}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

interface EqualityTester<T> {
	boolean areEqual(T o1, T o2);
}

class StrictEqualityTester {
	@SuppressWarnings("unchecked")
	public static <T> boolean areEqual(T me, Object you, EqualityTester<T> tester) {
		if(me == you)
			return true;
		if(you == null)
			return false;
		if(you.getClass() != me.getClass())
			return false;
		return tester.areEqual(me, (T)you);
	}
}

class PairHash {
	public static int hash(int h1, int h2) {
		return ThomasWangHash.hash64bit((((long) h1) << 32) | h2);
	}
}

class ThomasWangHash {

	// from http://www.concentric.net/~ttwang/tech/inthash.htm

	public static int hash32bit(int key) {
		key = ~key + (key << 15); // key = (key << 15) - key - 1;
		key = key ^ (key >>> 12);
		key = key + (key << 2);
		key = key ^ (key >>> 4);
		key = key * 2057; // key = (key + (key << 3)) + (key << 11);
		key = key ^ (key >>> 16);
		return key;
	}

	public static int hash64bit(long key) {
		key = (~key) + (key << 18); // key = (key << 18) - key - 1;
		key = key ^ (key >>> 31);
		key = key * 21; // key = (key + (key << 2)) + (key << 4);
		key = key ^ (key >>> 11);
		key = key + (key << 6);
		key = key ^ (key >>> 22);
		return (int) key;
	}
}


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextInt();

		long left = xorAll(a);
		long right = 0;
		long max = 0;
		Trie<Boolean> trie = Trie.create();
		trie.add(tobools(0));
		for(int i=n-1; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean leftbit = (left & (1<<j)) > 0;
				if(leftbit) {
					boolean prefer = !leftbit;
					if(cur.hasChild(prefer)) {
						cur = cur.getChild(prefer);
						best |= (1<<j);
					} else {
						cur = cur.getChild(!prefer);
					}
				}
			}
			max = Math.max(max, best);

			left ^= a[i];
			right ^= a[i];
			trie.add(tobools(right));
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private MutableArrayUsingBooleanArray tobools(long right) {
		boolean[] r = new boolean[64];
		for(int j=63;j>=0;j--)
			r[j] = (right & (1<<j)) > 0;
		return new MutableArrayUsingBooleanArray(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(10*1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

class MutableArrayUsingBooleanArray implements MutableArray<Boolean> {

	// TODO static createor�� �ٲٱ�.

	private final boolean[] a;
	private final int n;

	public MutableArrayUsingBooleanArray(boolean[] a) {
		this.a = a;
		n = a.length;
	}

	public MutableArrayUsingBooleanArray(boolean[] a, int n) {
		this.a = a;
		this.n = n;
	}

	public Boolean get(int i) {
		return a[i];
	}

	public void set(int i, Boolean v) {
		a[i] = v;
	}

	public int size() {
		return n;
	}

	public final boolean isEmpty() {
		return size() == 0;
	}

	public final Iterator<Boolean> iterator() {
		return ArrayIterator.create(this);
	}

	public final String toString() {
		return IterableToString.toString(this);
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

class Trie<T> {

	public static <T> Trie<T> create() {
		return new Trie<T>();
	}

	private final TrieNode<T> root = TrieNode.create();

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = TrieNode.create();
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

}

class TrieNode<T> {

	public static <T> TrieNode<T> create() {
		return new TrieNode<T>();
	}

	private final MutableMap<T, TrieNode<T>> children = new JavaHashMapFactory().create();

	public boolean hasChild(T ch) {
		return children.containsKey(ch);
	}

	public TrieNode<T> getChild(T ch, TrieNode<T> def) {
		if(children.containsKey(ch))
			return children.get(ch);
		else
			return def;
	}

	public void putChild(T ch, TrieNode<T> node) {
		children.put(ch, node);
	}

	public int getChildCount() {
		return children.size();
	}

	public TrieNode<T> getChild(T ch) {
		return children.get(ch);
	}

}

class JavaHashMapFactory implements MutableMapFactory {

	public <K, V> MutableMap<K, V> create() {
		return new MutableMapWrapperForJavaMap<K, V>(new HashMap<K, V>());
	}

}

interface MutableMap<K, V> extends Collection<MutableEntry<K, V>> {
	// TODO ���������̽� �̱�.
	void clear();
	void put(K key, V value);
	void remove(K key);
	boolean containsKey(K key);
	V get(K key);
	Iterable<V> values();
	Iterable<K> keys();
}

interface MutableEntry<K, V> {
	// TODO �̰͵� �׳� Entry�� �־�� �ұ�?
	K getKey();
	V getValue();
	void setValue(V v);
}

interface MutableMapFactory {
	<K,V> MutableMap<K,V> create();
}

class MutableMapWrapperForJavaMap<K, V> implements MutableMap<K, V> {

	private final java.util.Map<K,V> map;

	public MutableMapWrapperForJavaMap(java.util.Map<K,V> map) {
		this.map = map;
	}

	public boolean containsKey(K key) {
		return map.containsKey(key);
	}

	public V get(K key) {
		return map.get(key);
	}

	public Iterable<K> keys() {
		return map.keySet();
	}

	public void put(K key, V value) {
		map.put(key, value);
	}

	public Iterable<V> values() {
		return map.values();
	}

	public void clear() {
		map.clear();
	}

	public boolean isEmpty() {
		return map.isEmpty();
	}

	public Iterator<MutableEntry<K, V>> iterator() {
		return ConvertedDataIterator.create(map.entrySet().iterator(), new DataConverter<java.util.Map.Entry<K,V>, MutableEntry<K,V>>() {
			public MutableEntry<K, V> convert(java.util.Map.Entry<K, V> e) {
				return new EntryWrapper<K, V>(e);
			}
		});
	}

	public int size() {
		return map.size();
	}

	public void remove(K key) {
		map.remove(key);
	}

	public String toString() {
		return map.toString();
	}

	private static class EntryWrapper<K, V> implements MutableEntry<K, V>, EqualityTester<EntryWrapper<K,V>> {
		private java.util.Map.Entry<K, V> e;
		private EntryWrapper(java.util.Map.Entry<K, V> e) {
			this.e = e;
		}
		public K getKey() {
			return e.getKey();
		}
		public V getValue() {
			return e.getValue();
		}
		public void setValue(V v) {
			e.setValue(v);
		}
		public boolean equals(Object obj) {
			return StrictEqualityTester.areEqual(this, obj, this);
		}
		public boolean areEqual(EntryWrapper<K, V> o1, EntryWrapper<K, V> o2) {
			return o1.getKey().equals(o2.getKey()) && o1.getValue().equals(o2.getValue());
		}
		public int hashCode() {
			return PairHash.hash(getKey().hashCode(), getValue().hashCode());
		}
	}

}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

interface EqualityTester<T> {
	boolean areEqual(T o1, T o2);
}

class StrictEqualityTester {
	@SuppressWarnings("unchecked")
	public static <T> boolean areEqual(T me, Object you, EqualityTester<T> tester) {
		if(me == you)
			return true;
		if(you == null)
			return false;
		if(you.getClass() != me.getClass())
			return false;
		return tester.areEqual(me, (T)you);
	}
}

class PairHash {
	public static int hash(int h1, int h2) {
		return ThomasWangHash.hash64bit((((long) h1) << 32) | h2);
	}
}

class ThomasWangHash {

	// from http://www.concentric.net/~ttwang/tech/inthash.htm

	public static int hash32bit(int key) {
		key = ~key + (key << 15); // key = (key << 15) - key - 1;
		key = key ^ (key >>> 12);
		key = key + (key << 2);
		key = key ^ (key >>> 4);
		key = key * 2057; // key = (key + (key << 3)) + (key << 11);
		key = key ^ (key >>> 16);
		return key;
	}

	public static int hash64bit(long key) {
		key = (~key) + (key << 18); // key = (key << 18) - key - 1;
		key = key ^ (key >>> 31);
		key = key * 21; // key = (key + (key << 2)) + (key << 4);
		key = key ^ (key >>> 11);
		key = key + (key << 6);
		key = key ^ (key >>> 22);
		return (int) key;
	}
}


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Random;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextLong();

		n = 100000;
		a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = new Random().nextLong() % 1000000000000L;

		long left = xorAll(a);
		long right = 0;
		long max = 0;
		Trie<Boolean> trie = Trie.create();
		trie.add(toarray(0));
		for(int i=n; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean leftbit = (left & (1L<<j)) > 0; // TODO LongBitUtil?? ??????.
				boolean prefer = !leftbit;
				if(cur.hasChild(prefer)) {
					cur = cur.getChild(prefer);
					best |= (1<<j);
				} else {
					cur = cur.getChild(!prefer);
				}
			}
//			System.out.println("L " + left);
//			System.out.println(trie);
			max = Math.max(max, best);

			if(i-1 >= 0) {
				left ^= a[i-1];
				right ^= a[i-1];
				Array<Boolean> array = toarray(right);
				trie.add(array);
			}
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private Array<Boolean> toarray(long right) {
		boolean[] r = new boolean[64];
		for(int j=63;j>=0;j--)
			r[63-j] = (right & (1L<<j)) > 0;
		return new MutableArrayUsingBooleanArray(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt", "E4.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(10*1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

class MutableArrayUsingBooleanArray implements MutableArray<Boolean> {

	// TODO static createor�� �ٲٱ�.

	private final boolean[] a;
	private final int n;

	public MutableArrayUsingBooleanArray(boolean[] a) {
		this.a = a;
		n = a.length;
	}

	public MutableArrayUsingBooleanArray(boolean[] a, int n) {
		this.a = a;
		this.n = n;
	}

	public Boolean get(int i) {
		return a[i];
	}

	public void set(int i, Boolean v) {
		a[i] = v;
	}

	public int size() {
		return n;
	}

	public final boolean isEmpty() {
		return size() == 0;
	}

	public final Iterator<Boolean> iterator() {
		return ArrayIterator.create(this);
	}

	public final String toString() {
		return IterableToString.toString(this);
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

class Trie<T> {

	public static <T> Trie<T> create() {
		return new Trie<T>();
	}

	private final TrieNode<T> root = TrieNode.create();

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = TrieNode.create();
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		toString(root, 0, sb);
		return sb.toString();
	}

	private void toString(TrieNode<T> node, int level, StringBuilder sb) {
		for(T c : node.getEdges()) {
			for(@SuppressWarnings("unused") int i : Range.zeroTo(level))
				sb.append(" ");
			sb.append(c + "\n");
			toString(node.getChild(c), level+1, sb);
		}
	}

}

class TrieNode<T> {

	private static final JavaHashMapFactory MF = new JavaHashMapFactory();

	public static <T> TrieNode<T> create() {
		return new TrieNode<T>();
	}

	private final MutableMap<T, TrieNode<T>> children = MF.create();

	public boolean hasChild(T ch) {
		return children.containsKey(ch);
	}

	public TrieNode<T> getChild(T ch, TrieNode<T> def) {
		TrieNode<T> r = children.get(ch, null);
		if(r != null)
			return r;
		else
			return def;
	}

	public void putChild(T ch, TrieNode<T> node) {
		children.put(ch, node);
	}

	public int getChildCount() {
		return children.size();
	}

	public TrieNode<T> getChild(T ch) {
		return children.get(ch);
	}

	public Iterable<T> getEdges() {
		return children.keys();
	}

}

class JavaHashMapFactory implements MutableMapFactory {

	public <K, V> MutableMap<K, V> create() {
		return new MutableMapWrapperForJavaMap<K, V>(new HashMap<K, V>());
	}

}

interface MutableMap<K, V> extends Collection<MutableEntry<K, V>> {
	// TODO ���������̽� �̱�.
	void clear();
	void put(K key, V value);
	void remove(K key);
	boolean containsKey(K key);
	V get(K key);
	V get(K key, V def);
	Iterable<V> values();
	Iterable<K> keys();
}

interface MutableEntry<K, V> {
	// TODO �̰͵� �׳� Entry�� �־�� �ұ�?
	K getKey();
	V getValue();
	void setValue(V v);
}

interface MutableMapFactory {
	<K,V> MutableMap<K,V> create();
}

class MutableMapWrapperForJavaMap<K, V> implements MutableMap<K, V> {

	private final java.util.Map<K,V> map;

	public MutableMapWrapperForJavaMap(java.util.Map<K,V> map) {
		this.map = map;
	}

	public boolean containsKey(K key) {
		return map.containsKey(key);
	}

	public V get(K key) {
		return map.get(key);
	}

	public V get(K key, V def) {
		V r = map.get(key);
		if (r != null)
			return r;
		else
			return def;
	}

	public Iterable<K> keys() {
		return map.keySet();
	}

	public void put(K key, V value) {
		map.put(key, value);
	}

	public Iterable<V> values() {
		return map.values();
	}

	public void clear() {
		map.clear();
	}

	public boolean isEmpty() {
		return map.isEmpty();
	}

	public Iterator<MutableEntry<K, V>> iterator() {
		return ConvertedDataIterator.create(map.entrySet().iterator(), new DataConverter<java.util.Map.Entry<K,V>, MutableEntry<K,V>>() {
			public MutableEntry<K, V> convert(java.util.Map.Entry<K, V> e) {
				return new EntryWrapper<K, V>(e);
			}
		});
	}

	public int size() {
		return map.size();
	}

	public void remove(K key) {
		map.remove(key);
	}

	public String toString() {
		return map.toString();
	}

	private static class EntryWrapper<K, V> implements MutableEntry<K, V>, EqualityTester<EntryWrapper<K,V>> {
		private java.util.Map.Entry<K, V> e;
		private EntryWrapper(java.util.Map.Entry<K, V> e) {
			this.e = e;
		}
		public K getKey() {
			return e.getKey();
		}
		public V getValue() {
			return e.getValue();
		}
		public void setValue(V v) {
			e.setValue(v);
		}
		public boolean equals(Object obj) {
			return StrictEqualityTester.areEqual(this, obj, this);
		}
		public boolean areEqual(EntryWrapper<K, V> o1, EntryWrapper<K, V> o2) {
			return o1.getKey().equals(o2.getKey()) && o1.getValue().equals(o2.getValue());
		}
		public int hashCode() {
			return PairHash.hash(getKey().hashCode(), getValue().hashCode());
		}
	}

}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

interface EqualityTester<T> {
	boolean areEqual(T o1, T o2);
}

class StrictEqualityTester {
	@SuppressWarnings("unchecked")
	public static <T> boolean areEqual(T me, Object you, EqualityTester<T> tester) {
		if(me == you)
			return true;
		if(you == null)
			return false;
		if(you.getClass() != me.getClass())
			return false;
		return tester.areEqual(me, (T)you);
	}
}

class PairHash {
	public static int hash(int h1, int h2) {
		return ThomasWangHash.hash64bit((((long) h1) << 32) | h2);
	}
}

class ThomasWangHash {

	// from http://www.concentric.net/~ttwang/tech/inthash.htm

	public static int hash32bit(int key) {
		key = ~key + (key << 15); // key = (key << 15) - key - 1;
		key = key ^ (key >>> 12);
		key = key + (key << 2);
		key = key ^ (key >>> 4);
		key = key * 2057; // key = (key + (key << 3)) + (key << 11);
		key = key ^ (key >>> 16);
		return key;
	}

	public static int hash64bit(long key) {
		key = (~key) + (key << 18); // key = (key << 18) - key - 1;
		key = key ^ (key >>> 31);
		key = key * 21; // key = (key + (key << 2)) + (key << 4);
		key = key ^ (key >>> 11);
		key = key + (key << 6);
		key = key ^ (key >>> 22);
		return (int) key;
	}
}


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.StringTokenizer;

public class CF173D2E implements CodeforcesSolver {

	//

	public void solve(InputStream is) {
		FastScanner in = new FastScanner(is);
		int n = in.nextInt();
		long[] a = new long[n];
		for(int i : Range.zeroTo(n))
			a[i] = in.nextLong();

		long leftsum = xorAll(a);
		long rightsum = 0;
		long max = 0;

		Trie<Boolean> trie = new Trie<Boolean>(TrieNodeFactoryForBooleanKey.create());
		trie.add(toarray(0));

		for(int i=n; i>= 0; i--) {
			TrieNode<Boolean> cur = trie.getRoot();
			long best = 0;
			for(int j=63;j>=0;j--) {
				boolean prefer = !LongBitUtil.get(leftsum, j);
				if(cur.hasChild(prefer)) {
					cur = cur.getChild(prefer);
					best = LongBitUtil.set(best, j);
				} else {
					cur = cur.getChild(!prefer);
				}
			}
			max = Math.max(max, best);

			if(i-1 >= 0) {
				leftsum ^= a[i-1];
				rightsum ^= a[i-1];
				trie.add(toarray(rightsum));
			}
		}
		System.out.println(max);
	}

	private long xorAll(long[] a) {
		long r = 0;
		for(long v : a)
			r ^= v;
		return r;
	}

	private Iterable<Boolean> toarray(final long v) {
		return ConvertedDataIterable.create(IntSequenceIterable.create(63, -1, 64), new DataConverter<Integer, Boolean>() {
			public Boolean convert(Integer i) {
				return LongBitUtil.get(v, i);
			}
		});
//		Boolean[] r = new Boolean[64];
//		for(int j=63;j>=0;j--)
//			r[63-j] = LongBitUtil.get(right, j);
//		return MutableArrayUsingJavaArray.create(r);
	}

	public static void main(String[] args) throws Exception {
		CodeforcesSolverLauncher.launch(new CodeforcesSolverFactory() {
			public CodeforcesSolver create() {
				return new CF173D2E();
			}
		}, "E1.txt", "E2.txt", "E3.txt", "E4.txt");
	}

}

interface CodeforcesSolver {
	void solve(InputStream is);
}

interface CodeforcesSolverFactory {
	CodeforcesSolver create();
}

class CodeforcesSolverLauncher {

	public static void launch(CodeforcesSolverFactory factory, String... inputFilePath) throws FileNotFoundException, IOException {
		if(System.getProperty("ONLINE_JUDGE", "false").equals("true")) {
			factory.create().solve(System.in);
		} else {
			for(String path : inputFilePath) {
				FileInputStream is = new FileInputStream(new File(path));
				factory.create().solve(is);
				is.close();
				System.out.println();
			}
		}
	}

}

class FastScanner {

	private StringTokenizer tokenizer;

	public FastScanner(InputStream is) {
		try {
			ByteArrayOutputStream bos = new ByteArrayOutputStream(1024*1024);
			byte[] buf = new byte[1024*1024];
			while(true) {
				int read = is.read(buf);
				if(read == -1)
					break;
				bos.write(buf, 0, read);
			}
			tokenizer = new StringTokenizer(new String(bos.toByteArray()));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public int nextInt() {
		return Integer.parseInt(tokenizer.nextToken());
	}

	public long nextLong() {
		return Long.parseLong(tokenizer.nextToken());
	}

	public String next() {
		return tokenizer.nextToken();
	}

}

class ConvertedDataIterable {

	public static <T1, T2> Iterable<T2> create(final Iterable<T1> outerIterable, final DataConverter<T1, T2> converter) {
		return new Iterable<T2>() {
			public Iterator<T2> iterator() {
				return ConvertedDataIterator.create(outerIterable.iterator(), converter);
			}
		};
	}
}

class ConvertedDataIterator {
	public static <T1, T2> Iterator<T2> create(final Iterator<T1> original, final DataConverter<T1, T2> converter) {
		return new ReadOnlyIterator<T2>() {
			public boolean hasNext() {
				return original.hasNext();
			}
			public T2 next() {
				return converter.convert(original.next());
			}
		};
	}
}

interface DataConverter<T1, T2> {
	T2 convert(T1 v);
}

abstract class ReadOnlyIterator<T> implements Iterator<T> {
	public final void remove() {
		throw new UnsupportedOperationException();
	}
}

class IntSequenceIterable {
	public static Iterable<Integer> create(final int from, final int step, final int size) {
		return new Iterable<Integer>() {
			public Iterator<Integer> iterator() {
				return new ReadOnlyIterator<Integer>() {
					int nextIndex = 0;
					public boolean hasNext() {
						return nextIndex < size;
					}
					public Integer next() {
						return from + step * (nextIndex++);
					}
				};
			}
		};
	}
}

class Range {

	public static Iterable<Integer> zeroTo(int end) {
		return fromTo(0, end);
	}

	public static Iterable<Integer> fromTo(int begin, int end) {
		return IntSequenceIterable.create(begin, 1, end-begin);
	}

}

interface Array<T> extends Collection<T> {
	T get(int index);
}

interface Collection<T> extends Iterable<T> {
	int size();
	boolean isEmpty();
}

class MutableArrayUsingJavaArray {

	public static <T> MutableArray<T> create(T[] a) {
		return new Impl<T>(a, 0, a.length);
	}

	private static class Impl<T> implements MutableArray<T> {
		final private T[] a;
		final private int start;
		final private int end;

		public Impl(T[] a, int start, int end) {
			this.a = a;
			this.start = start;
			this.end = end;
		}

		public T get(int p) {
			return a[start + p];
		}

		public void set(int p, T v) {
			a[start + p] = v;
		}

		public int size() {
			return end - start;
		}

		public final boolean isEmpty() {
			return start == end;
		}

		public final Iterator<T> iterator() {
			return ArrayIterator.create(this);
		}

		public final String toString() {
			return IterableToString.toString(this);
		}
	}

}

class IterableToString {
	public static <T> String toString(Iterable<T> iterable) {
		StringBuilder sb = new StringBuilder();
		sb.append('(');
		boolean first = true;
		for(T v : iterable) {
			if(first)
				first = false;
			else
				sb.append(',');
			sb.append(v);
		}
		sb.append(')');
		return sb.toString();
	}
}

class ArrayIterator {
	public static <T> Iterator<T> create(final Array<T> a) {
		return new ReadOnlyIterator<T>() {
			int p = 0;
			public boolean hasNext() {
				return p < a.size();
			}
			public T next() {
				return a.get(p++);
			}
		};
	}
}

interface MutableArray<T> extends Array<T> {
	void set(int index, T value);
}

class LongBitUtil {

	static long set(long v, int pos) {
		return v | (1L<<pos);
	}

	public static boolean get(long v, int pos) {
		return (v & (1L<<pos)) > 0;
	}

}

class Trie<T> {

	private final TrieNodeFactory<T> nodeFactory;
	private final TrieNode<T> root;

	public Trie(TrieNodeFactory<T> factory) {
		this.nodeFactory = factory;
		root = factory.create();
	}

	public void add(Iterable<T> sequence) {
		TrieNode<T> cur = root;
		for(T v : sequence) {
			TrieNode<T> subTrie = cur.getChild(v, null);
			if(subTrie == null) {
				subTrie = nodeFactory.create();
				cur.putChild(v, subTrie);
			}
			cur = subTrie;
		}
	}

	public TrieNode<T> getRoot() {
		return root;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		toString(root, 0, sb);
		return sb.toString();
	}

	private void toString(TrieNode<T> node, int level, StringBuilder sb) {
		for(T c : node.getEdges()) {
			for(@SuppressWarnings("unused") int i : Range.zeroTo(level))
				sb.append(" ");
			sb.append(c + "\n");
			toString(node.getChild(c), level+1, sb);
		}
	}

}

interface TrieNode<T> {
	int getChildCount();
	boolean hasChild(T ch);
	TrieNode<T> getChild(T ch, TrieNode<T> def);
	TrieNode<T> getChild(T ch);
	Iterable<T> getEdges();
	void putChild(T ch, TrieNode<T> node);
}

interface TrieNodeFactory<T> {
	TrieNode<T> create();
}

class TrieNodeFactoryForBooleanKey {

	// speed specialized for boolean keyed nodes.

	public static TrieNodeFactory<Boolean> create() {
		return new TrieNodeFactory<Boolean>() {
			public TrieNode<Boolean> create() {
				return new Node();
			}
		};
	}

	private static class Node implements TrieNode<Boolean> {

		private TrieNode<Boolean> zero, one;

		public void putChild(Boolean ch, TrieNode<Boolean> node) {
			if(ch)
				one = node;
			else
				zero = node;
		}

		public boolean hasChild(Boolean ch) {
			return (ch?one:zero) != null;
		}

		public Iterable<Boolean> getEdges() {
			return FilteredIterable.create(ArrayIterable.create(false, true), new DataFilter<Boolean>() { // slow. improve when need.
				public boolean isAccepted(Boolean v) {
					return hasChild(v);
				}
			});
		}

		public int getChildCount() {
			return (one==null?0:1) + (zero==null?0:1);
		}

		public TrieNode<Boolean> getChild(Boolean ch) {
			TrieNode<Boolean> cand = getChild(ch, null);
			if(cand == null)
				throw new RuntimeException();
			return cand;
		}

		public TrieNode<Boolean> getChild(Boolean ch, TrieNode<Boolean> def) {
			TrieNode<Boolean> cand = ch ? one : zero;
			if(cand != null)
				return cand;
			else
				return def;
		}
	}
}

interface DataFilter<T> {
	boolean isAccepted(T v);
}

class FilteredIterable {

	public static <T> Iterable<T> create(final Iterable<? extends T> original, final DataFilter<T> filter) {
		return new Iterable<T>() {
			public Iterator<T> iterator() {
				return new ReadOnlyIterator<T>() {

					Iterator<? extends T> cursor = original.iterator();
					T next = null;;

					public boolean hasNext() {
						ensureNext();
						return next != null;
					}

					public T next() {
						ensureNext();
						T r = next;
						next = null;
						return r;
					}

					private void ensureNext() {
						if (next == null) {
							while(cursor.hasNext()) {
								T value = cursor.next();
								if(filter.isAccepted(value)) {
									next = value;
									break;
								}
							}
						}
					}
				};
			}
		};
	}
}

class ArrayIterable {

	public static <T> Iterable<T> create(final T... data) {
		return ConvertedDataIterable.create(Range.zeroTo(data.length), new DataConverter<Integer, T>() {
			public T convert(Integer v) {
				return data[v];
			}
		});
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class E {
    public static void main(String[] args) throws Exception {
        int cnt = nextInt();
        long[] leftXor = new long[cnt + 1];
        leftXor[0] = 0;
        long[] ar = new long[cnt];
        for (int i = 0; i < cnt; i++) {
            ar[i] = nextLong();
            leftXor[i + 1] = leftXor[i] ^ ar[i];
        }
        Trie trie = new Trie();
        long cur = 0;
        for (int i = cnt - 1; i >= 0; i--) {
            StringBuffer bf = new StringBuffer(Long.toBinaryString(cur))
                    .reverse();
            while (bf.length() < 40) {
                bf.append("0");
            }
            bf = bf.reverse();
            trie.addWord(bf.toString(), 0, i + 1);
            cur ^= ar[i];
        }
        StringBuffer bf = new StringBuffer(Long.toBinaryString(cur)).reverse();
        while (bf.length() < 40) {
            bf.append("0");
        }
        bf = bf.reverse();
        trie.addWord(bf.toString(), 0, 0);
        long res = 0;
        for (int i = 0; i < leftXor.length; i++) {
            Trie current = trie;
            long tmp = 0;
            for (int j = 39; j >= 0; j--) {
                if (((1l << j) | leftXor[i]) == leftXor[i]) {
                    if (current.edges[0] != null
                            && current.edges[0].maxIdx >= i) {
                        current = current.edges[0];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[1];
                    }
                } else {
                    if (current.edges[1] != null
                            && current.edges[1].maxIdx >= i) {
                        current = current.edges[1];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[0];
                    }
                }
            }
            res = Math.max(res, tmp);
        }
        System.out.println(res);
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(
            System.in));
    static StringTokenizer tokenizer = new StringTokenizer("");

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }

    static String next() throws Exception {
        while (true) {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken();
            }
            String s = br.readLine();
            if (s == null) {
                return null;
            }
            tokenizer = new StringTokenizer(s);
        }
    }

    static class Trie {
        int maxIdx;
        Trie[] edges;

        public Trie() {
            maxIdx = 0;
            edges = new Trie[2];
        }

        public void addWord(String word, int wordIdx, int idx) {
            maxIdx = Math.max(maxIdx, idx);
            if (wordIdx == word.length()) {
                return;
            }
            int branch = word.charAt(wordIdx) - '0';
            if (edges[branch] == null) {
                edges[branch] = new Trie();
            }
            edges[branch].addWord(word, wordIdx + 1, idx);
        }
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class E {
    public static void main(String[] args) throws Exception {
        int cnt = nextInt();
        long[] leftXor = new long[cnt + 1];
        leftXor[0] = 0;
        long[] ar = new long[cnt];
        for (int i = 0; i < cnt; i++) {
            ar[i] = nextInt();
            leftXor[i + 1] = leftXor[i] ^ ar[i];
        }
        Trie trie = new Trie();
        long cur = 0;
        for (int i = cnt - 1; i >= 0; i--) {
            StringBuffer bf = new StringBuffer(Long.toBinaryString(cur))
                    .reverse();
            while (bf.length() < 40) {
                bf.append("0");
            }
            bf = bf.reverse();
            trie.addWord(bf.toString(), 0, i + 1);
            cur ^= ar[i];
        }
        StringBuffer bf = new StringBuffer(Long.toBinaryString(cur)).reverse();
        while (bf.length() < 40) {
            bf.append("0");
        }
        bf = bf.reverse();
        trie.addWord(bf.toString(), 0, 0);
        long res = 0;
        for (int i = 0; i < leftXor.length; i++) {
            Trie current = trie;
            long tmp=0;
            for (int j = 39; j >= 0; j--) {
                if (((1l << j) | leftXor[i]) == leftXor[i]) {
                    if (current.edges[0] != null && current.edges[0].maxIdx >= i) {
                        current = current.edges[0];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[1];
                    }
                } else {
                    if (current.edges[1] != null && current.edges[1].maxIdx >= i) {
                        current = current.edges[1];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[0];
                    }
                }
            }
            res=Math.max(res,tmp);
        }
        System.out.println(res);
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(
            System.in));
    static StringTokenizer tokenizer = new StringTokenizer("");

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }

    static String next() throws Exception {
        while (true) {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken();
            }
            String s = br.readLine();
            if (s == null) {
                return null;
            }
            tokenizer = new StringTokenizer(s);
        }
    }

    static class Trie {
        int maxIdx;
        Trie[] edges;

        public Trie() {
            maxIdx = 0;
            edges = new Trie[2];
        }

        public void addWord(String word, int wordIdx, int idx) {
            maxIdx = Math.max(maxIdx, idx);
            if (wordIdx == word.length()) {
                return;
            }
            int branch = word.charAt(wordIdx) - '0';
            if (edges[branch] == null) {
                edges[branch] = new Trie();
            }
            edges[branch].addWord(word, wordIdx + 1, idx);
        }
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class E {
    public static void main(String[] args) throws Exception {
        int cnt = nextInt();
        long[] leftXor = new long[cnt + 1];
        leftXor[0] = 0;
        long[] ar = new long[cnt];
        for (int i = 0; i < cnt; i++) {
            ar[i] = nextLong();
            leftXor[i + 1] = leftXor[i] ^ ar[i];
        }
        Trie trie = new Trie();
        long cur = 0;
        for (int i = cnt - 1; i >= 0; i--) {
            trie.addWord(cur, 39, i + 1);
            cur ^= ar[i];
        }
        trie.addWord(cur, 39, 0);
        long res = 0;
        for (int i = 0; i < leftXor.length; i++) {
            Trie current = trie;
            long tmp = 0;
            for (int j = 39; j >= 0; j--) {
                if (((1l << j) | leftXor[i]) == leftXor[i]) {
                    if (current.edges[0] != null
                            && current.edges[0].maxIdx >= i) {
                        current = current.edges[0];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[1];
                    }
                } else {
                    if (current.edges[1] != null
                            && current.edges[1].maxIdx >= i) {
                        current = current.edges[1];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[0];
                    }
                }
            }
            res = Math.max(res, tmp);
        }
        System.out.println(res);
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(
            System.in));
    static StringTokenizer tokenizer = new StringTokenizer("");

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }

    static String next() throws Exception {
        while (true) {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken();
            }
            String s = br.readLine();
            if (s == null) {
                return null;
            }
            tokenizer = new StringTokenizer(s);
        }
    }

    static class Trie {
        int maxIdx;
        Trie[] edges;

        public Trie() {
            maxIdx = 0;
            edges = new Trie[2];
        }

        public void addWord(long word, int wordIdx, int idx) {
            maxIdx = Math.max(maxIdx, idx);
            if (wordIdx == -1) {
                return;
            }
            int branch = ((word & (1l << wordIdx)) == 0) ? 0 : 1;
            if (edges[branch] == null) {
                edges[branch] = new Trie();
            }
            edges[branch].addWord(word, wordIdx - 1, idx);
        }
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class E {
    public static void main(String[] args) throws Exception {
        int cnt = nextInt();
        long[] leftXor = new long[cnt + 1];
        leftXor[0] = 0;
        long[] ar = new long[cnt];
        for (int i = 0; i < cnt; i++) {
            ar[i] = nextLong();
            leftXor[i + 1] = leftXor[i] ^ ar[i];
        }
        Trie trie = new Trie();
        long cur = 0;
        for (int i = cnt - 1; i >= 0; i--) {
            trie.addWord(cur, 39, i + 1);
            cur ^= ar[i];
        }
        trie.addWord(cur, 39, 0);
        long res = 0;
        for (int i = 0; i < leftXor.length; i++) {
            Trie current = trie;
            long tmp = 0;
            for (int j = 39; j >= 0; j--) {
                if (((1l << j) | leftXor[i]) == leftXor[i]) {
                    if (current.edges[0] != null
                            && current.edges[0].maxIdx >= i) {
                        current = current.edges[0];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[1];
                    }
                } else {
                    if (current.edges[1] != null
                            && current.edges[1].maxIdx >= i) {
                        current = current.edges[1];
                        tmp |= (1l << j);
                    } else {
                        current = current.edges[0];
                    }
                }
            }
            res = Math.max(res, tmp);
        }
        System.out.println(res);
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(
            System.in));
    static StringTokenizer tokenizer = new StringTokenizer("");

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }

    static String next() throws Exception {
        while (true) {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken();
            }
            String s = br.readLine();
            if (s == null) {
                return null;
            }
            tokenizer = new StringTokenizer(s);
        }
    }

    static class Trie {
        int maxIdx;
        Trie[] edges;

        public Trie() {
            maxIdx = 0;
            edges = new Trie[2];
        }

        public void addWord(long word, int wordIdx, int idx) {
            maxIdx = Math.max(maxIdx, idx);
            if (wordIdx == -1) {
                return;
            }
            int branch = ((word & (1l << word)) == 0) ? 0 : 1;
            if (edges[branch] == null) {
                edges[branch] = new Trie();
            }
            edges[branch].addWord(word, wordIdx - 1, idx);
        }
    }
}


import java.util.Scanner;

// http://codeforces.com/contest/282/problem/E
public class SausageMaximization {

    static class PrefixTreeNode {
        PrefixTreeNode left;

        PrefixTreeNode right;
    }

    static PrefixTreeNode root = new PrefixTreeNode();

    static final int HIGH = 40;

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        long[] a = new long[n];
        long left = 0;
        for (int i = 0; i < n; i++) {
            a[i] = s.nextLong();
            left ^= a[i];
        }
        long ans = left;
        long right = 0;
        add(0);
        for (int i = n - 1; i >= 0; i--) {
            left ^= a[i];
            right ^= a[i];
            long match = search(left);
            ans = Math.max(ans, left ^ match);
            add(right);
        }
        System.out.println(ans);
    }

    static long search(long num) {
        PrefixTreeNode cur = root;
        long match = 0;
        for (int i = HIGH; i >= 0; i--) {
            long ii = (1L << i);
            if ((ii & num) == 0) {
                if (cur.right != null) {
                    cur = cur.right;
                    match |= ii;
                } else {
                    cur = cur.left;
                }
            } else {
                if (cur.left != null) {
                    cur = cur.left;
                } else {
                    cur = cur.right;
                    match |= ii;
                }
            }
        }
        return match;
    }

    static void add(long num) {
        PrefixTreeNode cur = root;
        for (int i = HIGH; i >= 0; i--) {
            long ii = (1L << i);
            if ((ii & num) == 0) {
                if (cur.left == null) {
                    cur.left = new PrefixTreeNode();
                }
                cur = cur.left;
            } else {
                if (cur.right == null) {
                    cur.right = new PrefixTreeNode();
                }
                cur = cur.right;
            }
        }
    }
}


import java.util.Scanner;

/**

 */
public class Main {

    private static long base[];

    public static void main(String[] args) {

        base = new long[64];
        for (int i = 0; i < 64; ++ i){
            base[i] = (1l << i);
        }
        //BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        //String s = input.readLine();
        int n = sc.nextInt();
        //s = input.readLine();
        //String[] ss = s.split(" ");

        long[] nums = new long[n];
        long suffixXor = 0;
        for (int i = 0; i < n; ++i) {
            nums[i] = sc.nextLong();
            suffixXor ^= nums[i];
        }
        sc.close();
        System.out.println(getMaxXorWithPrefixAndSuffix(nums, suffixXor));

    }

    /**
     * @param nums
     * @param suffixXor
     * @return
     */
    public static long getMaxXorWithPrefixAndSuffix(long[] nums, long suffixXor) {
        long maxXor = suffixXor, prefixXor = 0;
        int len = nums.length;
        BinaryLongTrie trie = new BinaryLongTrie(len + 1);
        trie.insert(0l);
        for (int i = 0; i < len; ++i) {
            prefixXor ^= nums[i];
            suffixXor ^= nums[i];
            trie.insert(prefixXor);
            long temp = trie.search(suffixXor);
            maxXor = Math.max(maxXor, temp ^ suffixXor);
        }
        trie.clear();
        return maxXor;
    }

    static class BinaryLongTrie {

        private TNode[] nodes;
        private int total;

        public BinaryLongTrie(int len) {
            nodes = new TNode[64 * len];
            nodes[0] = new TNode();
            total = 1;
        }

        /**
         * Node for Trie tree
         */
        class TNode {
            int[] next;

            public TNode() {
                next = new int[]{-1, -1};
            }
        }

        /**
         * @param value
         */
        public void insert(long value) {
            for (int i = 63, u = 0; i >= 0; i--) {
                int id = (((1l) << i) & value) != 0 ? 1 : 0;
                if (nodes[u].next[id] == -1) {
                    nodes[total] = new TNode();
                    nodes[u].next[id] = total++;
                }
                u = nodes[u].next[id];
            }
        }

        /**
         * @param key
         * @return
         */
        public long search(long key) {
            long res = 0;
            for (int i = 63, u = 0; i >= 0; i--) {
                int id = (((1L) << i) & key) == 0 ? 1 : 0;
                if (nodes[u].next[id] == -1) id ^= 1;
                res = (res << 1) + (long) id;
                u = nodes[u].next[id];
            }
            return res;
        }

        public void clear() {
            nodes = null;
        }
    }

}


import java.util.Scanner;

public class Main {
	static Trie_Node root = new Trie_Node();
	private static final int bit_len = 40;

	public static void main(String[] args) {
		// TODO Auto-generated method stub
	    long prefix = 0, suffix = 0, ans = 0;
	    Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		long[] arr = new long [len];

	    for(int i = 0; i < len; i++) {
	        arr[i] = sc.nextLong();
	        suffix^=arr[i];
	    }
	    sc.close();

	    add(prefix);
        ans = Math.max(ans, query(suffix));
	    for(int i = 0; i < len+1; i++) {
	        add(prefix);
	        ans = Math.max(ans, query(suffix));
	        if(i < len) {
	        	prefix^=arr[i];
	        	suffix^=arr[i];
	        }

	    }
	    System.out.println(ans);

	}

	public static void add(long val) {

		Trie_Node tmp = root;
	    for(int i = bit_len; i>=0; i--) {
	        byte bit_val = (byte) ((byte)(val>>i)&1);
	        if(tmp.next[bit_val]==null){
	        	tmp.next[bit_val] = new Trie_Node();
	        }
	        tmp = tmp.next[bit_val];
	    }
	}
	public static long query(long val) {
		Trie_Node tmp = root;
	    long ret = 0;
	    for(int i = bit_len; i>=0; i--) {
	    	byte bit_val = (byte) ((byte)(val>>i)&1);
	        if(tmp.next[1^bit_val] !=null) {
	            ret |= 1L<<i;
	            bit_val ^=1;
	        }
	        tmp = tmp.next[bit_val];
	    }
	    return ret;
	}
}

class Trie_Node{
	Trie_Node[] next = new Trie_Node[2];
	public Trie_Node(){
		next[0] = null;
		next[1] = null;
	}

}