#include #define rep(i,n) for(int i = 0; i < n; i++) using namespace std; int main(void){ long long n,k; cin >> n >> k; vector A(n); rep(i,n) cin >> A[i]; sort(A.begin(),A.end()); long long cnt = 0; rep(i,n){ int ok = n,ng = -1; while(abs(ok-ng) > 1){ int mid = (ok+ng)/2; if(0.5*A[i]*A[mid] >= k) ok = mid; else ng = mid; } cnt += n-ok; } cout << cnt; }