#include using namespace std; #include using namespace atcoder; typedef long long ll; int main(){ ll n,x;cin >> n >> x; if(x>1000000){ cout<<0<cnt(x+1); for(;n--;){ ll a;cin >> a; if(a<=x)cnt[a]++; } auto ret = convolution_ll(cnt,cnt); cout << ret[x] << endl; }