#include using namespace std; int main() { int N, K; cin >> N >> K; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } int a = A[0]; auto it = A.begin(); int ans = 1; while (1) { it = lower_bound(A.begin(), A.end(), a + K); if (it == A.end()) { break; } a = *it; ans++; } cout << ans; }