#include using namespace std; using lint = long long; const lint inf = 1LL << 60; const lint mod = 1000000007; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); lint n; cin >> n; vector a(n); for (int i = 0; i < n; ++i) { cin >> a[i]; } lint ret = 0; for (int i = 0; i < n; ++i) { for (int j = i + 1; j < n; ++j) { ret = max(ret, a[i] ^ a[j]); } } cout << ret << "\n"; return 0; }