n, e, t = map(int, raw_input().split())
X = map(int, raw_input().split())

if n > 2001:
    exit(1)
ans = 0
d = [0]*n
def f(j, i):
    return d[j] + max(2*(X[i] - X[j+1]), t) + X[i] - X[j]
d[0] = t
for i in xrange(1, n):
    d[i] = max(2*(X[i] - X[0]), t) + X[i] - X[0]
    le = 0; ri = i
    while 1:
        k1 = (le*2 + ri) / 3
        k2 = (le + ri*2) / 3
        r1 = f(k1, i)
        r2 = f(k2, i)
        if r1 <= r2:
            if ri == k2:break
            ri = k2
        else:
            if le == k1:break
            le = k1
    d[i] = min(d[i], r1, r2)
print d[n-1]+ e - X[-1] + X[0]