use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let mut a: Vec = (0..n) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); for d in (0..61).rev() { let mut x = 0; let mut j = 0; for i in 0..a.len() { if a[i] >> d == 1 { x = a[i]; j = i; break; } } if x == 0 { continue; } for i in 0..a.len() { a[i] ^= ((a[i] >> d) & 1) * x; } a[j] = x; } let ans = a .iter() .fold(1u64, |acc, x| if *x != 0 { acc << 1 } else { acc }); println!("{}", ans); }