#x^y=X,y=x^X import collections N,X = map(int,input().split()) lsA = [int(input()) for i in range(N)] counter = collections.Counter(lsA) ans = 0 for i in range(N): x = lsA[i] c = counter[x^X] if x == x^X: c -= 1 ans += c print(ans//2)