N,X = map(int,input().split()) A = [int(input()) for _ in range(N)] ans = 0 from collections import Counter c = Counter(A) for a in A: ans += c[a^X] if a^a==X: ans -=1 print(ans//2)