from sys import stdin def main(): input = lambda: stdin.readline()[:-1] N, X = map(int, input().split()) A = [int(input()) for _ in [0] * N] x = [0] * N for i in range(N): x[i] = X ^ A[i] ans = 0 for i, a in enumerate(A): n = X ^ a ans += A[i+1:].count(n) print(ans) main()