#include #define rep(i,n) for(int i=0; i<(int)(n); i++) using namespace std; using LL = long long; using P = pair; int main(){ int N, X; cin >> N >> X; map m; vector A(N); rep(i,N){ int a; cin >> a; A[i]=a; m[a]++; } LL ans=0; rep(i,N){ LL k=X^A[i]; ans+=m[k]; } cout << ans/2 << endl; return 0; }