#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int i, j, k, l, m, n, o, p, x, a[N];
map<int, int> F;
long long ans = 0;
int main() {
  scanf("%d%d", &n, &x);
  F.clear();
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    p = x ^ a[i];
    ans += (long long)F[p];
    F[a[i]]++;
  }
  cout << ans << endl;
  return 0;
}
