#include <cstdio>
using namespace std;
#define LBUF 300000
#define BASE 10
#define NMAX 10000
char str[LBUF];
long long m[NMAX+2];
long long dp[NMAX+2];
int main(){
int n,np;
long long tmp,mx;
int i,j;
freopen("xor_equ.in","r",stdin);
freopen("xor_equ.out","w",stdout);
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%lld",m+i);
for(i=1;i<=n;i++){
mx=0;
for(j=0;j<i;j++)
if(dp[j]^m[i]>mx)
mx=dp[j]^m[i];
dp[i]=mx;
}
mx=0;
for(i=1;i<=n;i++)
if(dp[i]>mx)mx=dp[i];
printf("%lld",mx);
return 0;
}