N, E, T = map(int, raw_input().split())
X = map(int, raw_input().split())
hoge = []

for i in xrange(N):
    for j in xrange(i+1, N):
        d = X[j] - X[i]
        score = d*2+max(0, T-2*d) - (j-i+1)*T
        if score < 0:
            hoge.append((score, i, j))
hoge.sort()
piyo = []
for h in hoge:
    for p in piyo:
        if p[0] <= h[1] <= p[1] or p[0] <= h[2] <= p[1]:
            break
    else:
        piyo.append(h)

print E+T*N + sum(p[0] for p in piyo)
