import 'dart:convert';
import 'dart:io';
import 'dart:async';

Future main() async {
  List nck = stdin.readLineSync().split(" ").map((x) => int.parse(x)).toList();
  Stream<String> tLines =
      stdin.transform(utf8.decoder).transform(LineSplitter()); // ここ大事（複数行入力）
  int i; //i番目の人
  i = 0;
  int ti;
  List ab = [];
  List abi = [];
  List limits = [];
  int limit0 = 0;
  int limit1 = 0;
  List tList = [];
  int lineNum;
  lineNum = 1;
  await for (String line in tLines) {
    lineNum = lineNum + 1;
    ti = int.parse(line);
    tList.add(ti);
    limits.add(ti + nck[1]);

    if (lineNum > nck[0]) break; // ここの場所！
  }

  int count = 0;
  int busNum = 1;
  for (int i = 1; i < nck[0] - 1; i++) {
    int limit = (limits[i - 1] < limits[i]) ? limits[i - 1] : limits[i];
    count++;
    if (count < nck[1] && limit > tList[i + 1]) {
      continue;
    }
    count = 0;

    busNum++;
  }
  print(busNum);
}