def main(): N = int(input()) A = list(map(int, input().split())) maximum = -1 for idx, a_elm in enumerate(A): for other_a_elm in A[idx+1:]: maximum = max(maximum, a_elm ^ other_a_elm) print(maximum) if __name__ == "__main__": main()