fn main() { let n = { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().parse::().unwrap() }; let aa = { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.split_whitespace() .map(|x| x.parse::().unwrap()) .collect::>() }; let mut ans = 0; for i in 0..n { for j in (i + 1)..n { ans = ans.max(aa[i] ^ aa[j]); } } println!("{}", ans); }