N,X = map(int,input().split()) A = [int(input()) for _ in range(N)] mapA = {} B = [] ans = 0 for a in A: if a in mapA: mapA[a] += 1 else: mapA[a] = 1 B.append(a^X) for b in B: if b in mapA: ans += mapA[b] print(ans//2)