#include // #include // #define RANGE_1(e) (boost::irange(0,(e))) // #define RANGE_2(s,e) (boost::irange((s),(e))) // #define RANGE_3(s,e,step) (boost::irange((s),(e),(step))) // #define RANGE_SELECTER(_1,_2,_3,SELECT,...) SELECT // #define range(...) RANGE_SELECTER(__VA_ARGS__, RANGE_3, RANGE_2, RANGE_1) (__VA_ARGS__) // #define guard(x) if(x); #define CINS(x) for(auto&& __E__:(x))cin>>__E__; #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define CALL(x) (x).cbegin(),(x).cend() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) #define BIT(n) (1LL<<(n)) using namespace std; using lint = long long; templateclass irange{private:struct I{T x;T operator*(){return x;}bool operator!=(I&lhs){return xclass srange{private:struct I{T x,s;T operator*(){return x;}bool operator!=(I&lhs){if(s<(T)0)return x>lhs.x;return xirangerange(T n){return irange(0,n);}templateirangerange(T i,T n){return irange(i,n);}templatesrangerange(T i,T n,T s){return srange(i,n,s);} templatebool amax(T &a,const T &b){if(abool amin(T &a,const T &b){if(a>b){a=b;return 1;}return 0;} struct initialize{initialize(){cin.tie(nullptr);ios::sync_with_stdio(false);};}__ini__; int main(){ /* Code Area */ int n; cin >> n; vector a(n); CINS(a); int maxX = 0; for (int i : range(n)) { for (int j : range(i + 1, n)) { amax(maxX, a[i] ^ a[j]); } } cout << maxX << endl; }