N=int(input()) A=list(map(int,input().split())) m=0 for i,x in enumerate(A): for y in A[i+1:]: m=max(m,x^y) print(m)