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).
import java.io.*;
import java.util.*;
import java.math.*;
public class temp
{
    static HashMap<Long, Long> hm[];
    public static void main(String[] args) throws IOException
    {
        StringBuilder inner = new StringBuilder();
        
        // ArrayList<Integer> list = new ArrayList<>();
        Reader s = new Reader();
        //FastReader s = new FastReader();
       
            int n = s.ni();
            long k = s.ni();
            Integer arr[] = new Integer[n];
            for (int i = 0; i < n; i++)
            {
                arr[i] = s.ni();                   
            }
            
                
            Arrays.sort(arr);
            int count = 0;
            int j = n/2;
            int i = 0;
            while(i<n/2&&j<n)
            {
                if(arr[j]-arr[i]>=k)
                {
                    count++;
                    i++;
                    j++;
                }
                else
                    j++;
            }

            println(count);
        
    }   
    
    /*

    ********if input in hashmap*********

    for (int i = 0; i < n; i++)
    {
        int x = s.nextInt();
        if (!hm.containsKey(x))
            hm.put(x, 1);
        else
            hm.put(x, hm.get(x) + 1);
    }

     */
 /*

    ********if input in 2darray*********

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            arr[i][j] = s.nextInt();
        }
    }

     */
 /*
    
    *********GCD**********

    private static int gcdThing(int a, int b)
    {
        return BigInteger.valueOf(a).gcd(BigInteger.valueOf(b)).intValue();
    }

     */
 /*

    ***********nCr**********

    static int nCr(int n, int k)
    {
        int ans = 1;
        if ( k > n - k )
            k = n - k;
        for (int i = 0; i < k; ++i)
        {
            ans *= (n - i);
            ans /= (i + 1);
        }
        return res;
    }

     */
 /*
    ******Method to check if x is power of 2********
    
    static boolean isPowerOfTwo (int x)
    {
        return x!=0 && ((x&(x-1)) == 0);
    }
     */
 /*
    *******generate all primes*******
    
    void sieveOfEratosthenes(int n)
    {
        // Create a boolean array "prime[0..n]" and initialize
        // all entries it as true. A value in prime[i] will
        // finally be false if i is Not a prime, else true.
        boolean prime[] = new boolean[n+1];
        for(int i=0;i<n;i++)
            prime[i] = true;

        for(int p = 2; p*p <=n; p++)
        {
            // If prime[p] is not changed, then it is a prime
            if(prime[p] == true)
            {
                // Update all multiples of p
                for(int i = p*2; i <= n; i += p)
                    prime[i] = false;
            }
        }

        // Print all prime numbers
        for(int i = 2; i <= n; i++)
        {
            if(prime[i] == true)
                System.out.print(i + " ");
        }
    }

     */

 /*
    *********permutaion program********

    static boolean shouldSwap(StringBuilder str, int start, int curr)
    {
        for (int i = start; i < curr; i++)
        {
            if (str.charAt(i) == str.charAt(curr))
            {
                return false;
            }
        }
        return true;
    }

    static void findPermutations(StringBuilder str, int index, int n, HashSet<Integer> hs)
    {
        if (index >= n)
        {
            int number = Integer.parseInt(str.toString(), 2);
            hs.add(number);
            return;
        }

        for (int i = index; i < n; i++)
        {

            boolean check = shouldSwap(str, index, i);
            if (check)
            {
                char temp = str.charAt(index);
                str.setCharAt(index, str.charAt(i));
                str.setCharAt(i, temp);
                findPermutations(str, index + 1, n, hs);
                temp = str.charAt(index);
                str.setCharAt(index, str.charAt(i));
                str.setCharAt(i, temp);
            }
        }
    }
     */
 /*
    ********** island program********

    public static int findisland(int[][]a,int n,int m)
    {
        int count = 0;
        int [][]visited = new int[n][m];
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < m; j++)
            {
                if (visited[i][j] == 0 && a[i][j] == 1)
                {
                    count++;
                    island(a, n, m, i, j, visited);
                }
            }

        }
        return count;
    }
    static void island(int [][]a, int n, int m,int i, int j, int[][] visited)
    {
        if (i >= 0 && i < n && j >= 0 && j < m && visited[i][j] == 0 && a[i][j] == 1)
        {
            visited[i][j] = 1;
            for (int k = -1; k <= 1; k++)
            {
                for (int l = -1; l <= 1; l++)
                {
                    if (i+k >= 0 && i+k < n && j+l >= 0 && j+l < m )
                        island(a, n, m, i+k, j+l, visited);
                }
            }
        }
        else
            return;
    }

     */


    static class pair
    {
        int a,b;
        pair(int x, int y)
        {
            a=x;
            b=y;
        }
    }
    static void println(Object line) 
    {
        System.out.println(line);
    }
    static void print(Object line) 
    {
        System.out.print(line);
    }

    static class Reader
    {

        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int ni() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        public long nl() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        public double nd() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }

            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
            {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
            {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
            {
                return;
            }
            din.close();
        }
    }

    /*recommended*/
    static class FastReader
    {

        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public FastReader(String file_name) throws IOException
        {
            br = new BufferedReader(new FileReader(file_name));
        }
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int ni()
        {
            return Integer.parseInt(next());
        }

        long nl()
        {
            return Long.parseLong(next());
        }

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

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            } catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

    }
}
