from bisect import bisect_right, bisect_left n, x = map(int, input().split()) alst = [int(input()) for _ in range(n)] ans = 0 alst.sort() for a in alst: xor = a ^ x ans += bisect_right(alst, xor) - bisect_left(alst, xor) print(ans // 2)