n, x = map(int,input().split()) A = [int(input()) for _ in range(n)] cnt = {} ans = 0 for a in A: rev_a = x ^ a if rev_a in cnt: ans += cnt[rev_a] if a in cnt: cnt[a] += 1 else: cnt[a] = 1 print(ans)