#include using ll = long long; using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; scanf("%d", &n); vector a(n); for (int i = 0; i < n; ++i) scanf("%d", &a[i]); int res{ 0 }; for (int i =0; i < n-1; ++i) { for (int j = i+1; j < n; ++j) res = max(res, a[i]^a[j]); } printf("%d\n", res); return 0; }