#define _USE_MATH_DEFINES #include using namespace std; //template #define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define ALL(v) (v).begin(),(v).end() typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12; templateinline bool chmax(T& a,T b){if(ainline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} //end int main(){ int n,x; cin>>n>>x; map cnt; rep(i,0,n){ int x; cin>>x; cnt[x]++; } ll res=0; for(auto [v,c]:cnt){ int y=v^x; if(cnt.count(y)){ res+=cnt[v]*cnt[y]; cnt[v]=cnt[y]=0; } else{ cnt[v]=0; } } cout<