from collections import defaultdict import sys readline=sys.stdin.readline write=sys.stdout.write import bisect N,K=map(int,readline().split()) A=list(map(int,readline().split())) ans=0 A.sort() for a in A: ans+=N-bisect.bisect_left(A,(2*K+a-1)//a) print(ans)