import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.Map.Entry; import java.util.Scanner; import java.util.TreeSet; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final long D = sc.nextLong(); final long T = sc.nextLong(); HashMap> mods = new HashMap>(); long[] xs = new long[N]; for(int i = 0; i < N; i++){ xs[i] = sc.nextLong(); } final long min_xs = Arrays.stream(xs).min().getAsLong(); for(int i = 0; i < N; i++){ final long X = xs[i] - min_xs; final long mod = X % D; if(!mods.containsKey(mod)){ mods.put(mod, new TreeSet()); } mods.get(mod).add(X); } long answer = 0; for(final Entry> entry : mods.entrySet()){ final long mod = entry.getKey(); final ArrayList list = new ArrayList(entry.getValue()); if(list.size() == 1){ answer += (2 * T + 1); continue; } answer += T; for(int fst = 0; fst < list.size() - 1; fst++){ final int snd = fst + 1; final long diff = (list.get(snd) - list.get(fst)) / D - 1; final long min = Math.min(diff, 2 * T); answer += min + 1; } answer += T + 1; } System.out.println(answer); } }