#include #include using namespace std; int main(){ map A; int n,x;cin>>n>>x; for(int i = 0; n > i; i++){ int t;cin>>t; A[t]++; } long long ans = 0; for(auto z: A){ if(x==0){ ans += (z.second*(z.second-1)); }else{ ans += z.second*A[z.first^x]; } } cout << ans/2 << endl; }