#include #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; typedef long double ld; template bool chmax(T &a, const T &b) { if (a bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector a(n); rep(i, n) cin >> a[i]; int ans = 0; for(int i = 0; i < n; i++){ for(int j = i + 1; j < n; j++){ chmax(ans, a[i] ^ a[j]); } } cout << ans << endl; }