import bisect N, K = map(int, input().split()) A = list(map(int,input().split())) A.sort() cnt = 0 for i in range(N): cnt += (N-bisect.bisect_right(A, 2*K/A[i])) print(cnt)