import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) from collections import defaultdict n, x = map(int, readline().split()) a = [int(readline()) for _ in range(n)] dict = defaultdict(int) ans = 0 for aa in a: ans += dict[x ^ aa] dict[aa] += 1 print(ans)