#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) using Int = long long; const char newl = '\n'; //INSERT ABOVE HERE const int MAX = 200000; using uint = unsigned int; uint a[MAX]={}; signed main(){ cin.tie(0); ios::sync_with_stdio(0); int n, x; cin >> n >> x; unsigned long long ans = 0; for(int i = 0; i < n; i++) cin >> a[i]; rep(i, n) rep(j, i) { uint ai = a[i], aj = a[j]; if ((ai ^ aj) < x) ans += ai | aj; } cout<