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