n = int(input()) a = list(map(int,input().split())) x = 0 for i in range(n): for j in range(i+1,n): if a[i]^a[j] > x: x = a[i]^a[j] print(x)