#include <bits/stdc++.h>
using namespace std;
long long q[1000001], a[100001];
int main() {
  long long n, x, cnt = 0;
  cin >> n >> x;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    q[a[i]]++;
  }
  int e = 0;
  if (!x) {
    e = 1;
  }
  for (int i = 1; i <= n; i++) {
    int w = x;
    w ^= a[i];
    cnt += q[w] - e;
    q[a[i]]--;
  }
  cout << cnt;
  return 0;
}
