use std::io::{stdin, BufRead}; fn main() { let stdin = stdin(); let mut stdin = stdin.lock().lines().map(Result::unwrap); let _n = stdin.next().unwrap().parse::().unwrap(); let a = stdin .next() .unwrap() .split_whitespace() .map(|x| x.parse::().unwrap()) .collect::>(); let mut basis = Vec::new(); for &(mut x) in &a { for &b in &basis { x = x.min(x ^ b); } if x != 0 { basis.push(x); } } let ans = 1 << basis.len(); println!("{}", ans); }