use std::{convert::TryInto, io::stdin, ops::BitXor}; fn main() { let _n = { let mut buf = String::new(); stdin().read_line(&mut buf).unwrap(); }; let a_arry = { let mut buf = String::new(); stdin().read_line(&mut buf).unwrap(); buf.split_whitespace() .map(|s| s.parse::().unwrap()) .collect() }; println!("{}", solve(a_arry)); } fn solve(a_arry: Vec) -> u16 { let mut x_arry = [false; 2 << 14]; x_arry[0] = true; for a in a_arry.iter() { for (i, _) in x_arry.clone().iter().enumerate().filter(|(_, &b)| b) { let i = (i as u16).bitxor(a); x_arry[i as usize] = true; } } x_arry.iter().filter(|&&x| x).count().try_into().unwrap() }