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