from collections import defaultdict dc = defaultdict(int) n,x = map(int,input().split()) ans = 0 for i in range(n): a = int(input()) y = x^a ans += dc[y] dc[a] += 1 print(ans)