use std::collections::HashSet; fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: HashSet = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut result: HashSet = HashSet::new(); result.insert(0); for v in a.iter() { let mut next = result.clone(); for i in result.iter() { next.insert(v ^ i); } result = next; } println!("{}", result.len()); }