use std::io::Read; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let d: i64 = itr.next().unwrap().parse().unwrap(); let t: i64 = itr.next().unwrap().parse().unwrap(); let mut a: Vec = (0..n) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); a.sort(); let mut ans: i64 = 0; let mut check: Vec = vec![false; n]; for i in 0..n { if !check[i] { check[i] = true; // 左側 ans += t * 2 + 1; let mut l: usize = i; let mut r: usize = i + 1; while r < n { if (a[r] - a[l]).abs() % d != 0 { r += 1; continue; } check[r] = true; if (a[r] - a[l]).abs() / 2 <= t * d { ans += (a[r] - a[l]).abs() / d; } else { ans += t * 2 + 1; } l = r; r += 1; } } } println!("{}", ans); }