import sys readline = sys.stdin.readline ns = lambda: readline().rstrip() ni = lambda: int(readline().rstrip()) nm = lambda: map(int, readline().split()) nl = lambda: list(map(int, readline().split())) def solve(): n, x = nm() ans = 0 d = dict() for _ in range(n): y = ni() ans += d.get(x^y, 0) d[y] = d.get(y, 0) + 1 print(ans) return solve()