package main

import (
"bufio"
"fmt"
"os"
"strconv"
)


func main() {
	var n, k int
	fmt.Scan(&n, &k)

	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	a := make([]int, n)
	b := []int{}
	for i := 0; i < n; i++ {
		sc.Scan()
		a[i], _ = strconv.Atoi(sc.Text())

		if i == 0 {
			b =append(b,a[i])
			continue
		}

		diff := abs(b[len(b)-1] - a[i])
		if diff <= k {
			b = append(b, a[i])
		}
	}
	fmt.Println(len(b))

}

func abs(n int) int {
	y := n >> 63
	return (n ^ y) - y
}
