n, d, t = map(int, input().split()) from collections import defaultdict dic = defaultdict(list) for x in map(int, input().split()): xq, xr = divmod(x, d) dic[xr].append(xq) ans = 0 for xs in dic.values(): xs.sort() nxt = -10**18 for x in xs: ans += x + t - max(nxt, x - t) + 1 nxt = x + t + 1 print(ans)