#include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdio>

using namespace std;

#define Set(a, b) memset(a, b, sizeof a)

typedef long long LL;

const LL Inf = LONG_LONG_MAX / 2;
const int N = 1e5 + 10;

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

int main() {

	scanf("%d %d %d", &n, &e, &t);
	for (int i = 1; i <= n; ++i) 
		scanf("%lld", &p[i]);
	Set(f, 60);
	f[0] = 0;
	LL mn = Inf;
	for (int i = 1, j = 0; i <= n; ++i) {
		for (; t <= 2 * (p[i] - p[j + 1]); ++j) 
			mn = min(mn, f[j] - 2 * p[j + 1]);
		if (j < i)
			f[i] = min(f[i], f[j] + t);
		f[i] = min(f[i], mn + 2 * p[i]);
	}
	printf("%lld\n", e + f[n]);

	return 0;
}
