Bike loves looking for the second maximum element in the sequence. The second maximum element in the sequence of distinct numbers x_1, x_2, ..., x_{k} (k > 1) is such maximum element x_{j}, that the following inequality holds: $x_{j} \neq \operatorname{max}_{i = 1}^{k} x_{i}$.

The lucky number of the sequence of distinct positive integers x_1, x_2, ..., x_{k} (k > 1) is the number that is equal to the bitwise excluding OR of the maximum element of the sequence and the second maximum element of the sequence.

You've got a sequence of distinct positive integers s_1, s_2, ..., s_{n} (n > 1). Let's denote sequence s_{l}, s_{l} + 1, ..., s_{r} as s[l..r] (1 ≤ l < r ≤ n). Your task is to find the maximum number among all lucky numbers of sequences s[l..r].

Note that as all numbers in sequence s are distinct, all the given definitions make sence.


-----Input-----

The first line contains integer n (1 < n ≤ 10^5). The second line contains n distinct integers s_1, s_2, ..., s_{n} (1 ≤ s_{i} ≤ 10^9).


-----Output-----

Print a single integer — the maximum lucky number among all lucky numbers of sequences s[l..r].


-----Examples-----
Input
5
5 2 1 4 3

Output
7

Input
5
9 8 3 5 7

Output
15



-----Note-----

For the first sample you can choose s[4..5] = {4, 3} and its lucky number is (4 xor 3) = 7. You can also choose s[1..2].

For the second sample you must choose s[2..5] = {8, 3, 5, 7}.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'RI = lambda : [int(x) for x in input().split()]\nrw = lambda : [input().strip()]\nn=int(input())\nl=RI()\n\nstack=[]\nindex_stack=-1\n\nmaxo=0\ni=0\nwhile(i<n):\n    if(index_stack==-1 or stack[index_stack]>l[i]):\n        stack.append(l[i])\n        index_stack+=1\n        i+=1\n    else:\n        #print(stack[index_stack],end=" ")\n        #print(l[i])\n        maxo=max(stack[index_stack]^l[i],maxo)\n        temp=stack[index_stack]\n\n        stack.pop()\n        index_stack-=1\n\n        \n        if(len(stack)!=0):\n            #print(stack[index_stack],end=" ")\n            #print(stack[index_stack])\n            maxo=max(temp^stack[index_stack],maxo)\n\nwhile(len(stack)!=1):\n    temp=stack[index_stack]\n    \n    stack.pop()\n    index_stack-=1\n\n    #print(stack[index_stack],end=" ")\n    #print(stack[index_stack])\n    maxo=max(temp^stack[index_stack],maxo)\nprint(maxo)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13635