import sys import collections sys.setrecursionlimit(10 ** 8) input = sys.stdin.readline def main(): N, X = [int(x) for x in input().split()] A = [int(input()) for _ in range(N)] c = collections.Counter(A) ans = 0 for a in A: ans += c[a ^ X] print(ans // 2) if __name__ == '__main__': main()