import bisect N,K=map(int,input().split()) A=sorted(map(int,input().split())) ANS=0 for a in A: ANS+=N-bisect.bisect_left(A,(2*K+a-1)//a) print(ANS)