import java.util.*; import java.io.*; public class Main { public static PrintWriter pw = new PrintWriter(System.out); public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int t = 1; while( t > 0 ) { solve(); t--; } pw.flush(); } static void solve() { int N = sc.nextInt(); long K = sc.nextLong(); long[] a = new long[N+1]; long ans = 0; a[N] = (long)1<<60; for( int i = 0; i < N; i++ ) { a[i] = sc.nextInt(); } Arrays.sort(a); for( int i = 0; i < N; i++ ) { int res = lowerBound(a,(2*K+a[i]-1)/a[i]); if( res != -1 ) ans += N-res; } pw.println(ans); } static int lowerBound(long[] a, long val) { int low = 0; int high = a.length-1; int mid = 0; while( low < high ) { mid = (low+high)/2; if( a[mid] < val ) low = mid+1; else high = mid; } return high; } }