N,D,T=map(int,raw_input().split())
X=map(int,raw_input().split())
lists=[[] for i in range(D)]
for x in X:
    lists[x%D].append(x)
ans=N
for i in range(D):
    lists[i].sort()
    if len(lists[i])>0:
        ans+=T*2
        for j in range(len(lists[i])-1):
            if lists[i][j+1]-lists[i][j] >= (2*T+1)*D:
                #print lists[i][j],'-',lists[i][j+1],"=",T*2
                ans += T*2
            else:
                #print lists[i][j],'-',lists[i][j+1],"=", (lists[i][j+1]-lists[i][j])/D-1
                ans += (lists[i][j+1]-lists[i][j])/D-1
print ans