#include #include #include using namespace std; using vi = vector; int main() { int N; cin >> N; vi A(N); for (int i = 0; i < N; ++i) cin >> A[i]; int ans = -1; for (int i = 0; i < N; ++i) { for (int j = i + 1; j < N; ++j) { ans = max(ans, A[i] ^ A[j]); } } cout << ans << endl; }