def main(): n,x = map(int,input().split()) a = [int(input()) for i in range(n)] #lim = max(a) #b = [0 for i in range(lim + 1)] d = {} for i in range(n): d.setdefault(a[i] ^ x,0) d[a[i] ^ x] += 1 cnt = 0 for i in range(n): d.setdefault(a[i],0) cnt += d[a[i]] print(cnt // 2) main()