use proconio::input; fn main() { input! { n:usize, k:i64, x:[i64;n], } let mut ans = 1; let mut lastx = x[0]; for i in 1..n { if x[i] - lastx < k { continue; } lastx = x[i]; ans += 1; } println!("{}", ans); }