#include #include #include using namespace std; int main() { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) cin >> a[i]; sort(a.begin(), a.end()); int ans = 0; for (int i = 0; i < n; i++) ans =max(ans, a[i] ^ a[0]); cout << ans << endl; return 0; }