#include <cstdio>
using namespace std;
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
typedef long long LL;
const int N = 1e5 + 10;
const LL inf = 1e18 + 10;
int n, e, t, x[N]; LL f[N], g[N];

template <class T> inline void in(T &x) {
	x = 0; int f = 1; char ch = getchar();
	for (; ch<'0' || ch>'9';) {if (ch=='-') f=-1; ch = getchar();}
	for (; ch>='0' && ch<='9';) x = x*10 + ch-'0', ch = getchar();
	x *= f;
}

int main() {
	in(n), in(e), in(t), g[n + 1] = inf;
	for (int i = 1; i <= n; ++i) in(x[i]);
	for (int i = n, j = n; i; --i) {
		for (;(x[j] - x[i] << 1) > t;) --j;
		f[i] = min(f[j + 1] + t, g[j + 1] - 2 * x[i]);
		g[i] = min(g[i + 1], f[i + 1] + 2 * x[i]);
	}
	printf("%lld\n", f[1] + e);
	return 0;
}