use std::cmp::*; use std::io::*; fn main() { let mut s: String = String::new(); stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let x: usize = itr.next().unwrap().parse().unwrap(); let a: Vec = (0..n) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); let mut map = std::collections::HashMap::new(); let mut ans = 0u64; for i in 0..n { let p = map.entry(x ^ a[i]).or_insert(0); ans += *p; let q = map.entry(a[i]).or_insert(0); *q += 1; } println!("{}", ans); }