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 = '\'\'\'\n    Auther: ghoshashis545 Ashis Ghosh\n    College: Jalpaiguri Govt Enggineering College\n\'\'\'\nfrom os import path\nimport sys\nfrom functools import cmp_to_key as ctk\nfrom collections import deque,defaultdict as dd \nfrom bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right\nfrom itertools import permutations\nfrom datetime import datetime\nfrom math import ceil,sqrt,log,gcd\ndef ii():return int(input())\ndef si():return input()\ndef mi():return list(map(int,input().split()))\ndef li():return list(mi())\nabc=\'abcdefghijklmnopqrstuvwxyz\'\nabd={\'a\': 0, \'b\': 1, \'c\': 2, \'d\': 3, \'e\': 4, \'f\': 5, \'g\': 6, \'h\': 7, \'i\': 8, \'j\': 9, \'k\': 10, \'l\': 11, \'m\': 12, \'n\': 13, \'o\': 14, \'p\': 15, \'q\': 16, \'r\': 17, \'s\': 18, \'t\': 19, \'u\': 20, \'v\': 21, \'w\': 22, \'x\': 23, \'y\': 24, \'z\': 25}\nmod=1000000007\n#mod=998244353\ninf = float("inf")\nvow=[\'a\',\'e\',\'i\',\'o\',\'u\']\ndx,dy=[-1,1,0,0],[0,0,1,-1]\n\ndef bo(i):\n    return ord(i)-ord(\'a\')\n\n\n\ndef solve():\n    \n    \n    n=ii()\n    a=li()\n    b=[]\n    for j in range(31,-1,-1):\n        for i in range(n):\n            if (a[i]>>j)&1:\n                b.append(i)\n        if(len(b)<n and len(b)>0):\n            break\n        b=[]\n        \n    \n        \n    if len(b)==n or len(b)==0:\n        print(0)\n        return\n        \n    ans=0\n    x=0\n    \n    for j in range(len(b)-1):\n        \n        mx=0\n        x1=a[b[j]]\n        for i in range(b[j]-1,x-1,-1):\n            mx=max(mx,a[i])\n            ans=max(ans,x1^mx)\n        mx=0\n        for i in range(b[j]+1,b[j+1]):\n            mx=max(mx,a[i])\n            ans=max(ans,x1^mx)\n        x=b[j]+1\n    \n    \n       \n    mx=0\n    x1=a[b[len(b)-1]]\n    for i in range(b[len(b)-1]-1,x-1,-1):\n        mx=max(mx,a[i])\n        ans=max(ans,x1^mx)\n    \n    mx=0\n    for i in range(b[len(b)-1]+1,n):\n            mx=max(mx,a[i])\n            ans=max(ans,x1^mx)\n            \n    print(ans)\n    \n    \n    \n    \n    \n    \n    \n    \ndef __starting_point():\n    \n    solve()\n    \n\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 366745