import java.util.*; public class Main { static int BASE = 1000000000; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); long t = sc.nextInt(); int[] point = new int[n]; for (int i = 0; i < n; i++) { point[i] = sc.nextInt() + BASE; } Arrays.sort(point); HashMap> map = new HashMap<>(); for (int x : point) { if (!map.containsKey(x % d)) { map.put(x % d, new ArrayList<>()); } map.get(x % d).add(x / d); } long ans = 0; for (ArrayList list : map.values()) { ans += t * 2 + 1; for (int i = 0; i < list.size() - 1; i++) { ans += Math.min(list.get(i + 1) - list.get(i), t * 2); } } System.out.println(ans); } }