from sys import stdin
from itertools import repeat
def main():
    n, e, t = map(int, stdin.readline().split())
    x = map(int, stdin.readline().split(), repeat(10, n))
    i = 1
    j = 0
    dp = [0] * n
    f = [0] * n
    dp[0] = t
    f[0] = -x[0] * 2
    for i in xrange(1, n):
        dp[i] = dp[i-1]
        while j < i and (x[i] - x[j]) * 2 > t:
            j += 1
        dp[i] = dp[j] + t
        if j > 0 and dp[i] > f[j-1] + x[i] * 2:
            dp[i] = f[j-1] + x[i] * 2
        f[i] = dp[i] - x[i] * 2
        if f[i] > f[i-1]:
            f[i] = f[i-1]
    print dp[-1] + e
main()
