from collections import Counter from sys import stdin def main(): input = lambda: stdin.readline()[:-1] N, X = map(int, input().split()) A = [int(input()) for _ in [0] * N] cnt = Counter(A) ans = 0 for a in A: n = X ^ a ans += cnt[n] print(ans // 2) main()