#include <bits/stdc++.h>
int data[11234567] = {};
int main() {
  int n, x;
  long long result = 0;
  scanf("%d %d", &n, &x);
  for (int i = 0; i < n; i++) {
    int t;
    scanf("%d", &t);
    result += data[t];
    t = t ^ x;
    data[t]++;
  }
  printf("%lld\n", result);
  return 0;
}
