#include <bits/stdc++.h>   using namespace std;   using LL = long long;   using DD = long double;   using pii = pair<int, int>;   const LL INFLL = 0x7f7f7f7f7f7f7f7fLL;   const int INFint = 0x7f7f7f7f;   LL exactMatchingSubranges(vector<int> &cumulative, int match) {     LL rr = 0;     for (int i = 0; i < int((int((cumulative).size()))); ++i) {       int looking_for = match ^ cumulative[i];       int p = lower_bound((cumulative).begin(), (cumulative).end(), looking_for) -               cumulative.begin();       int q = upper_bound((cumulative).begin(), (cumulative).end(), looking_for) -               cumulative.begin();       rr += q - p;     }     return rr;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.precision(16);     int n, k;     cin >> n >> k;     vector<int> aa(n, 0);     for (int i = 0; i < int(n); ++i) cin >> aa[i];     vector<int> cumulative((int((aa).size())), 0);     cumulative[0] = aa[0];     int amax = 0;     for (int i = int(1); i < int((int((aa).size()))); ++i) {       cumulative[i] = cumulative[i - 1] ^ aa[i];       amax = max(amax, aa[i]);     }     cumulative.push_back(0);     sort((cumulative).begin(), (cumulative).end());     LL rr = exactMatchingSubranges(cumulative, k);     while (true) {       if ((k & 1) == 0) {         k |= 1;         rr += exactMatchingSubranges(cumulative, k);       }       k >>= 1;       amax >>= 1;       if (amax == 0) break;       for (int i = 0; i < int((int((cumulative).size()))); ++i)         cumulative[i] >>= 1;     }     cout << rr / 2 <<   n ;     return 0;   }   