#![allow(unused_imports)] use std::cmp::*; fn main() { let n = read::(); let a = read_vec::(); let mut ans = 0; for i in 0..n { for j in i + 1..n { ans = max(ans, a[i] ^ a[j]); } } println!("{}", ans); } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn read_vec() -> Vec { read::() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() }