import sys input=lambda: sys.stdin.readline().rstrip() n,x=map(int,input().split()) import collections D=collections.defaultdict(int) ans=0 for i in range(n): a=int(input()) ans+=D[a^x] D[a]+=1 print(ans)