#include <algorithm>
#include <iostream>
#include <set>
using namespace std;

const int MAXN = 1e5 + 10;
long long e, t, dp[MAXN], mn = 1e17;
int n, x[MAXN];

int main() {
	cin >> n >> e >> t;
	for (int i = 1; i <= n; i++)
		cin >> x[i];
	dp[1] = t;
	int j = 1;
	for (int i = 2; i <= n; i++) {
		while ((x[i] - x[j]) * 2 > t) {
			mn = min(mn, dp[j - 1] - 2 * x[j]);
			j++;
		}
		dp[i] = min(mn + 2 * x[i], dp[j - 1] + t);
	}
	cout << dp[n] + e;
}
