def main(): n,x = map(int,input().split()) a = [int(input()) for i in range(n)] b = [] c = [0 for i in range(n + 1)] for i in range(n): b.append(a[i] ^ x) c[a[i]] += 1 cnt = 0 for i in range(n): cnt += c[a[i]] print(cnt // 2) main()