use proconio::input; fn main() { input! { n:usize, k:usize, x:[usize;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); }