#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	D
# CreatedDate:  2020-09-26 20:52:29 +0900
# LastModified: 2020-09-26 22:26:39 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd
from itertools import accumulate


def main():
    N, K = map(int, input().split())
    C = []
    for i in range(N):
        prev = int(input())
        C.append(prev)

    i = 1
    while i < len(C):
        if abs(C[i-1]-C[i]) <= K:
            i += 1
            pass
        else:
            C.pop(i)
    i = 1
    print(len(C))



if __name__ == "__main__":
    main()
