import operator from functools import reduce from sys import stdin, stdout input = lambda: stdin.readline().rstrip() write = stdout.write def main(): global A, Ret n = int(input()) A = tuple(map(int, input().split())) Ret = [] fp(n) print(max(Ret)) def fp(n, d=None, dd=None, idx=0): nh = n // 2 if d is None: d = [0] * nh if dd is None: dd = [0] * n if idx == n: pwr = [0] * nh for i in range(n): pwr[dd[i]] += A[i] Ret.append(reduce(operator.xor, pwr)) return for i in range(nh): if d[i] == 0: d[i] = 1 dd[idx] = i fp(n, d, dd, idx + 1) d[i] = 0 break for i in range(nh): if d[i] == 1: d[i] = 2 dd[idx] = i fp(n, d, dd, idx + 1) d[i] = 1 main()