#include int ri() { int n; scanf("%d", &n); return n; } int main() { int n = ri(); int x = ri(); int a[n]; for (auto &i : a) i = ri(); std::map all; for (auto i : a) all[i]++; int64_t res = 0; for (int i = 0; i < n; i++) res += all[a[i] ^ x]; if (!x) for (auto &i : all) res -= (int64_t) i.second * i.second * 2; printf("%" PRId64 "\n", res / 2); return 0; }