#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); ll N,K; cin >> N >> K; K *= 2; vector A(N); rep(i,N) cin >> A[i]; sort(A.begin(), A.end()); ll ans = 0; rep(i,N) ans += A.end() - lower_bound(A.begin(), A.end(), (K + A[i] - 1) / A[i]); cout << ans << endl; }