#include using namespace std; int main() { int n, x; cin>>n>>x; map m; for (int i=0; i>a; ++m[a]; } long long ans = 0; for (auto e: m) { int a = e.first; long cnt = e.second; auto it = m.lower_bound(x - a); if (it == m.end()) { continue; } else if ((*it).first == x - a) { ans += cnt * (*it).second; } } cout<