https://www.acmicpc.net/problem/1449
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int l=s.nextInt();
int arr[]=new int[n];
for(int i=0;i<n;i++){
arr[i]=s.nextInt();
}
Arrays.sort(arr);
int count=1;
int num=l-1;
for(int i=0;i<n-1;i++){
if(num>=arr[i+1]-arr[i]){
num-=arr[i+1]-arr[i];
}
else{
num=l-1;
count++;
}
}
System.out.print(count);
}
}