#include <algorithm>
#include <cctype>
#include <cstring>
#include <cstdio>
using namespace std;
typedef long long int64;
inline int read(int f = 1, int x = 0, char ch = ' ')
{
    while(!isdigit(ch = getchar())) if(ch == '-') f = -1;
    while(isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    return f*x;
} 
const int N = 2e5+5;
const int64 INF = 0x3f3f3f3f3f3f3f3f;
int n, t, e, px[N];
int64 f[N], w = INF;
int main()
{
    n = read(), e = read(), t = read();
    for(int i = 1; i <= n; ++i) px[i] = read();
    for(int i = 1, j = 0; i <= n; ++i)
    {
        while(2*(px[i]-px[j+1]) >= t) w = min(f[j]-2*px[j+1], w), ++j;
        f[i] = min(w+2*px[i], f[j]+t);
    }
    printf("%lld\n", f[n]+e);
    return 0;
}