import java.util.Arrays;
import java.util.Scanner;
public class P1449 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int answer = 0, a[] = new int[sc.nextInt()], k = sc.nextInt();
for (int i = 0; i < a.length; i++) {
a[i] = sc.nextInt();
}
Arrays.sort(a);
double tape = a[0] - 0.5;
for (int i = 0; i < a.length; i++) {
if(tape + k >= a[i] + 0.5) {
continue;
}else{
answer++;
tape = a[i] - 0.5;
}
}
System.out.println(answer + 1);
sc.close();
}
}