N,X=map(int,input().split()) d={} m=0 for _ in range(N): x=int(input()) m+=d.get(x^X,0) d[x]=d.get(x,0)+1 print(m)