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.*;
     
public class Solution {
     
    public static void main(String[] args) throws Exception{ 
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int z = Integer.parseInt(st.nextToken());
        
        int[] a = new int[n];
        
        st = new StringTokenizer(br.readLine());
        for(int i=0; i<n;i++)
          a[i] = Integer.parseInt(st.nextToken());
          
        mergeSort(a,0,a.length-1);
        int ans = 0;
        
        for(int i=n/2, j=0; i<n && j<n/2;i++){
             if(a[i]-a[j] >= z){
                  ans++;
                  j++;
             }
        }
        
        out.println(ans);
        out.close();
    }
    
     private static void mergeSort(int []a,int low, int high){
         if(low == high)
          return;
          
             int mid = (low + high)/2;
                  mergeSort(a,low,mid);
                  mergeSort(a,mid+1,high);
                  merge(a,low,mid,mid+1,high);
     }
     
     private static void merge(int[] a,int l1, int h1, int l2, int h2){
         int low = l1;
         int k=0;
         int[] temp = new int[h2-l1+1];
         while(l1<=h1 && l2 <= h2){
             if(a[l1] <= a[l2])
                 temp[k++] = a[l1++];
             else
               temp[k++] = a[l2++];
         }
         
         while(l1 <= h1)
          temp[k++] = a[l1++];
          
         while(l2 <= h2)
          temp[k++] = a[l2++];
          
          k=0;
         for(int i=low; i<=h2; i++,k++)
         a[i] = temp[k];
     }
    
}