#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 10;
const double MIN = 1e-6;
int exi[MAX];
int main() {
  int n, x, num;
  cin >> n >> x;
  long long tot = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num);
    if (exi[num ^ x]) tot += exi[num ^ x];
    exi[num] = exi[num] + 1LL;
  }
  cout << tot << endl;
  return 0;
}
