#include #include using namespace std; int main() { int N; long long K; scanf("%d%lld", &N, &K); vector A(N); for (int &x : A) scanf("%d", &x); long long cnt = 0; for (int i = 0; i < N; ++i) { long long targ = (2*K+A[i]-1)/A[i]; if(targ > 1'000'000'000) continue; int itarg = targ; for (int j = 0; j < i; ++j) if(A[j] >= itarg) ++cnt; } cnt *= 2; for(int i=0; i= 2*K) ++cnt; printf("%lld\n", cnt); }