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


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    N, K = map(int, input().split())
    A = []
    for i in range(N):
        if i==0:
            prev = int(input())
        else:
            cur = int(input())
            A.append(abs(cur-prev))
            prev = cur
    ans = [a for a in A if a <= K]
    print(len(ans)+1)


if __name__ == "__main__":
    main()
