#include using namespace std; using ll = long long; template istream& operator >> (istream& is, vector& vec) { for(T& x : vec) is >> x; return is; } template ostream& operator << (ostream& os, const vector& vec) { if(vec.empty()) return os; os << vec[0]; for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it; return os; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; vector x(n); cin >> x; sort(x.begin(), x.end()); int pre = x[0], ans = 1; for(int i = 1; i < n; i++){ if(x[i] >= pre + k){ ans++; pre = x[i]; } } cout << ans << '\n'; }