#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; ll x; cin >> n >> x; ll ans = 0; map memo; for (int i = 0; i < n; i++) { ll a; cin >> a; ans += memo[a ^ x]; ++memo[a]; } cout << ans << newl; return 0; }