n,x=map(int,input().split()) a=[int(input()) for i in range(n)] ans=0 for i in range(n): b=x^a[i] ans+=a.count(b) print(ans//2)