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 = '#!/usr/bin/env python\n# coding: utf-8\n\n# In[5]:\n\n\nfrom collections import deque\n\nstack=deque()\nn=int(input())\na=list(map(int,input().split()))\nres1=0\nl=0\n\nfor i in a:\n    while stack and stack[-1]<i:\n        stack.pop()\n        l-=1\n        \n    stack.append(i)\n    l+=1\n    \n    if l>1:\n        res1=max(res1,stack[-1]^stack[-2])\n        \n        \nstack.clear()\nl=0\nres2=0\na.reverse()\n\nfor i in a:\n    while stack and stack[-1]<i:\n        stack.pop()\n        l-=1\n        \n    stack.append(i)\n    l+=1\n    \n    if l>1:\n        res2=max(res2,stack[-1]^stack[-2])\n        \n\n        \nprint(max(res1,res2))\n\n\n# In[ ]:\n\n\n\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14795