You are given a set of points x_1, x_2, ..., x_n on the number line.

Two points i and j can be matched with each other if the following conditions hold:

  * neither i nor j is matched with any other point; 
  * |x_i - x_j| ≥ z. 



What is the maximum number of pairs of points you can match with each other?

Input

The first line contains two integers n and z (2 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ z ≤ 10^9) — the number of points and the constraint on the distance between matched points, respectively.

The second line contains n integers x_1, x_2, ..., x_n (1 ≤ x_i ≤ 10^9).

Output

Print one integer — the maximum number of pairs of points you can match with each other.

Examples

Input


4 2
1 3 3 7


Output


2


Input


5 5
10 9 5 8 7


Output


1

Note

In the first example, you may match point 1 with point 2 (|3 - 1| ≥ 2), and point 3 with point 4 (|7 - 3| ≥ 2).

In the second example, you may match point 1 with point 3 (|5 - 10| ≥ 5).
//package ContestEd64;


import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class mainC {
    public static PrintWriter out = new PrintWriter(System.out);
    public static FastScanner enter = new FastScanner(System.in);

    public static void main(String[] args) throws IOException {
        int n=enter.nextInt();
        long z=enter.nextLong();
        long arr[] =new long[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=enter.nextLong();
        }
        sortMergeNoRecursive(arr);
        int l=0,r=n/2;
        int m;
        while (r-l>=1){
            m=(l+r+1)/2;
            boolean ok=f(arr,m,z);
            if(ok) l=m;
            else r=m-1;
        }
        out.print(r);
        out.close();
    }

    public static boolean f(long[] arr, int mid,long z){
        for (int i = 0; i <mid ; i++) {
            if(arr[arr.length-mid+i]-arr[i]<z) return false;
        }
        return true;
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer stok;

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        String next() throws IOException {
            while (stok == null || !stok.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return null;
                }
                stok = new StringTokenizer(s);
            }
            return stok.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        char nextChar() throws IOException {
            return (char) (br.read());
        }

        String nextLine() throws IOException {
            return br.readLine();
        }
    }
    private static void sortMergeNoRecursive(long[] arr) {
        int len = arr.length;
        int n = 1; // кратность сравнений (сравнивать по 1-му элем., 2-м ...)
        int shift; // сдвиг в перебираемом массиве
        int two_size; // количество элементов для 2-го массива
        long[] arr2;
        while (n < len) {
            shift = 0;
            while (shift < len) {
                if (shift + n >= len) break;
                two_size = (shift + n * 2 > len) ? (len - (shift + n)) : n;
                arr2 = merge(Arrays.copyOfRange(arr, shift, shift + n),
                        Arrays.copyOfRange(arr, shift + n, shift + n + two_size));
                for (int i = 0; i < n + two_size; ++i)
                    arr[shift + i] = arr2[i]; // замена на отсортированное
                shift += n * 2;
            }
            n *= 2;
        }
    }

    private static long[] merge(long[] arr_1, long[] arr_2) {
        int len_1 = arr_1.length, len_2 = arr_2.length;
        int a = 0, b = 0, len = len_1 + len_2; // a, b - счетчики в массивах
        long[] result = new long[len];
        for (int i = 0; i < len; i++) {
            if (b < len_2 && a < len_1) {
                if (arr_1[a] > arr_2[b]) result[i] = arr_2[b++];
                else result[i] = arr_1[a++];
            } else if (b < len_2) {
                result[i] = arr_2[b++];
            } else {
                result[i] = arr_1[a++];
            }
        }
        return result;
    }
}