n,x=map(int,input().split()) a=[int(input()) for _ in range(n)] from collections import Counter ans=0 b=Counter(a) for i in a: if i^x in b: ans+=b[i^x] print(ans//2)