import sequtils,strutils,algorithm var N, X : int64 A : seq[int64] B : seq[int64] ans : int64 f :array[200010, int64] (N, X) = stdin.readline.split.map(parseBiggestInt) for i in 1..N: A.add(stdin.readline.parseBiggestInt) A.sort(cmp) for i,a in A: if B.len == 0 or B[^1] != a: B.add(a) f[B.high] += 1 for i,a in B: if X == 0: ans += f[i] * (f[i] - 1) div 2 continue var k : int64 = (X xor a) var j = B.lowerbound(k) if j > B.high or B[j] != k: continue ans += f[j] * f[i] if X > 0: echo (ans div 2) else: echo ans