#include <cstdio>
#include <algorithm>
#include <queue>

#define Rep(i, n) for (int i = 1; i <= n; i ++)
#define Rep0(i, n) for (int i = 0; i <= n; i ++)
#define RepG(i, x) for (int i = head[x]; i; i = edge[i].next)
#define v edge[i].to
#define mp(a, b) make_pair(a, b)

using namespace std;

typedef long long LL;
const int N = 1000100;

int x[N], n, e, t;
LL f[N];


int main()
{
	scanf("%d%d%d", &n, &e, &t);
	Rep(i, n) scanf("%d", &x[i]);
	
	int j = 0;
	LL tmp = 1e18;
	Rep(i, n) {
		f[i] = 1e18;
        while (t <= (x[i] - x[j + 1]) * 2){
            tmp = min(tmp, f[j] - 2 * x[j + 1]);
        	j ++;	
		}
        if(j < i) f[i] = min(f[i], f[j] + t);
        f[i] = min(f[i], tmp + 2 * x[i]);
    }
    printf("%lld\n", f[n] + e);
	
	return 0;
}
