#include <bits/stdc++.h>
using namespace std;
const char nxtl = (char)'\n';
const int maxn = (int)2e5 + 5;
const int INF_INT = (int)1e9 + 99;
const long long INF_BIG = (long long)1e18 + 99;
const int MOD = (int)1e9 + 7;
long long a[maxn], M[maxn];
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, x;
  cin >> n >> x;
  long long res = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    res += M[a[i] ^ x];
    M[a[i]]++;
  }
  cout << res;
  return 0;
}
