#include using namespace std; int main() { int64_t n, x; cin >> n >> x; vector as(n); for(auto&a:as){ cin>>a; } sort(as.begin(),as.end()); int64_t ans = 0; for(auto&a:as){ int64_t b=x-a; ans+=distance(lower_bound(as.begin(),as.end(),b),upper_bound(as.begin(),as.end(),b))-(a==b); } cout<