#include using namespace std; typedef long long ll; typedef long double ld; int main(int argc, char *argv[]) { ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); ll N,X;cin>>N>>X; map mp; for(int i=0;i>a; mp[a]++; } ll ans=0; for(auto &kv:mp){ auto num = kv.first; auto cnt = kv.second; if (num*2==X){ ans += cnt * cnt; } else if(num*2