import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline readlines=sys.stdin.buffer.readlines n, d, t=map(int, readline().split()) x=list(map(int, readline().split())) from collections import defaultdict mp=defaultdict(list) for a in x: q, r=divmod(a, d) mp[r].append(q) ans=0 for v in mp.values(): v.sort() v.append(10**10) l=v[0] xp=v[0] for x in v: if x-xp>2*t: ans+=xp-l+1+2*t l=x xp=x print(ans)