import sys input = sys.stdin.readline from collections import Counter N,X=map(int,input().split()) A=Counter([int(input()) for i in range(N)]) ANS=0 for a in A: ANS+=A[a]*A[a^X] print(ANS//2)