#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, first;
  cin >> n >> first;
  vector<int> a(n, 0);
  map<int, int> all;
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    cin >> a[i];
  }
  long long res = 0;
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    int k = first ^ a[i];
    if (all.count(k)) {
      res += all[k];
    }
    if (!all.count(a[i])) {
      all[a[i]] = 0;
    }
    all[a[i]]++;
  }
  cout << res << endl;
  return 0;
}
