2 1
1 1
 4 1
2 2 1 1
 10 1
2 6 3 4 2 4 4 3 2 1
 2 1
999152 999153
 8 1000000
1 1 5 1000000 1000000 2 2 2
 9 2
1 6 1 5 5 8 6 8 7
 15 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 1 4
8
 10 1
6 3 1 3 6 4 1 3 6 4
 10 1
1 2 3 5 6 8 10 11 9 4
 7 2
1 5 5 8 9 8 8
 2 1000000
1 1000000
 8 2
3 13 9 8 3 13 9 14
 1 1
1
 2 1
1 2

2
 2
 4
 1
 2
 4
 15
 1
 7
 2
 4
 1
 5
 1
 1

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		//InputStream inputStream = new FileInputStream(new File("barnpainting.in"));
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		
		//PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("barnpainting.out"))); 
		Task t = new Task();
		t.solve(in, out);
		out.close();
	}

	static class Task {
		public void solve(InputReader in, PrintWriter out) throws IOException {
			long tStart = System.currentTimeMillis();
			int n = in.nextInt();
			int k = in.nextInt();
			int arr[] = new int[n];
			for(int i=0;i<n;i++) {
				arr[i] = in.nextInt();
			}
			Arrays.sort(arr);
			int s=0;
			for(int i=0;i<n-1;i++) {
				if(arr[i+1]-arr[i]>k) s++;
			}
			out.println(s+1);
		}
	
	    public int findKthLargest(int[] nums, int k) {
	    	int n = nums.length;
	    	return helper(nums,0,n-1,n-k);	    	
	    }
	    int helper(int[] arr, int s, int e, int k) {
	    	int mid = s+(e-s)/2;
	    	int t = arr[mid];
	    	int l = s;
	    	int r = e;
	    	while(l<r) {
	    		while(l<r&&arr[l]<t) {
	    			l++;
	    		}
	    		while(l<r&&arr[r]>t) {
	    			r--;
	    		}
	    		if(l<r) {
	    			swap(arr, l, r);
	    			l++;r--;
	    		}
	    	}
	    	if(l==k) {
	    		return arr[l];
	    	}
	    	else if(l<k) {
	    		return helper(arr,r,e,k);
	    	}else {
	    		return helper(arr,s,l,k);
	    	}
	    }
	    void swap(int[] arr, int i, int j) {
	    	int tmp = arr[i];
	    	arr[i] = arr[j];
	    	arr[j] = tmp;
	    }

	}

	// default class
	static class InputReader {
		public BufferedReader re;
		public StringTokenizer st;

		public InputReader(InputStream input) {
			re = new BufferedReader(new InputStreamReader(input));
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(re.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}

			}
			return st.nextToken();
		}

		public String nextLine() {
			String tmp = null;
			try {
				tmp = re.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return tmp;
		}

		public boolean hasNext() {
			String tmp;
			if (st != null && st.hasMoreTokens())
				return true;
			else {
				try {
					tmp = re.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				if (tmp != null) {
					st = new StringTokenizer(tmp);
					return true;
				} else {
					return false;
				}
			}

		}

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

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

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

	static class Dumper {
		static void print_int_arr(int[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			System.out.println("---------------------");
		}
		
		static void print_char_arr(char[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			System.out.println("---------------------");
		}		

		static void print_double_arr(double[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print_2d_arr(int[][] arr, int x, int y) {
			for (int i = 0; i < x; i++) {
				for (int j = 0; j < y; j++) {
					System.out.print(arr[i][j] + " ");
				}
				System.out.println();
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print_2d_arr(boolean[][] arr, int x, int y) {
			for (int i = 0; i < x; i++) {
				for (int j = 0; j < y; j++) {
					System.out.print(arr[i][j] + " ");
				}
				System.out.println();
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print(Object o) {
			System.out.println(o.toString());
		}

		static void getc() {
			System.out.println("here");
		}
	}
}
