# a^b==c は a^b^c==0 from collections import defaultdict n, x = map(int, input().split()) ans = 0 if x == 0: jisho1 = defaultdict(int) for i in range(n): a = int(input()) jisho1[a] += 1 zeronum = jisho1[0] if zeronum: ans += zeronum * (n - zeronum) ans += zeronum * (zeronum - 1) // 2 for key, val in jisho1.items(): if key == 0: continue ans += val * (val - 1) // 2 else: jisho1 = defaultdict(int) jisho2 = defaultdict(int) for i in range(n): a = int(input()) jisho1[a] += 1 jisho2[a ^ x] += 1 for key, val1 in jisho1.items(): if key == 0: continue val2 = jisho2[key] ans += val1 * val2 ans //= 2 print(ans)