import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N,*A = map(int, read().split()) def gen_powers(A): if not A: yield 0 return for i, x in enumerate(A): if not i: continue pair_power = A[0] + x B = A[1:i] + A[i+1:] for p in gen_powers(B): yield p ^ pair_power answer = max(gen_powers(A)) print(answer)