N=int(input()) A=list(map(int, input().split())) res=0 for i in range(N): for j in range(i+1,N): a,b=A[i],A[j] res=max(res,a^b) print(res)