/** * @FileName a.cpp * @Author kanpurin * @Created 2020.06.05 21:52:07 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n,x;cin >> n >> x; map mp; ll ans = 0; for (int i = 0; i < n; i++) { int a;cin >> a; if (mp.find(x ^ a) != mp.end()) { ans += mp[x ^ a]; } mp[a]++; } cout << ans << endl; return 0; }