n,d,t = map(int,input().split()) *x, = map(int,input().split()) dic = {} for xi in x: pi,qi = xi//d,xi%d if qi in dic: dic[qi].append(pi) else: dic[qi] = [pi] ans = 0 for lst in dic.values(): st = [] for i in lst: if st and st[-1][1] <= i-t: st[-1][1] = i+t else: st.append([i-t,i+t]) print(st) for L,R in st: ans += R-L+1 print(ans)