#include <bits/stdc++.h>
using namespace std;

#define int long long

const int N = 1e5 + 5;

int A[N], n, T, E, dp[N], pre[N];

int calc(int x, int y) {
	if(y == x + 1) return dp[x] + A[y] - A[x] + T;
	else return dp[x] + A[x + 1] - A[x] + (A[y] - A[x + 1]) * 3 + max(0LL, T - (A[y] - A[x + 1]) * 2);
}

main() {
	srand(time(0));
	cin >> n >> E >> T;
	for(int i = 1; i <= n; ++ i) scanf("%lld", &A[i]);
	//n = 5000, E = 1000000, T = 100000;
	int ans = 1e18, res = 0;
	dp[0] = 0;
	int cur = 0;
	dp[1] = A[1] + T;
	pre[1] = 0;
	for(int i = 2; i <= n; ++ i) {
		dp[i] = 1e18;
		for(int j = 0; j < i; ++ j)
		dp[i] = min(calc(j, i), dp[i]);
		for(int j = 0; j < i; ++ j) if(calc(j, i) == dp[i]) pre[i] = j;
		assert(pre[i] >= pre[i - 1]);
		//cerr << pre[i] << endl;
	}
	cout << dp[n] + E - A[n] << endl;
}