#include<bits/stdc++.h>
using namespace std;
int num[1000005];
int main()
{
int n,x,temp;
long long ans=0;
cin>>n>>x;
while(n--)
{
cin>>temp;
ans+=num[temp^x];
num[temp]++;
}
cout<<ans<<endl;
return 0;
}