#include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <bitset>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <queue>

#define mp make_pair
#define pb push_back


typedef long long ll;
typedef long double ld;

using namespace std;

ll x[120000];
int n;
ll e, t;
ll dp[120000];

int main() {
	scanf("%d%lld%lld", &n, &e, &t);
	for (int i = 0; i < n; ++i)
		scanf("%lld", x + i);
	int now = 0;
	ll mn = 1e10;
	for (int i = 0; i < n; ++i) {
		if (2 * (x[i] - x[0]) <= t) {
			dp[i] = t;
			continue;
		}
		mn = min(mn, -2 * x[0]);
		while (2 * (x[i] - x[now + 1]) > t) {
			mn = min(mn, dp[now] - 2 * x[now + 1]);
			now += 1;
		}
		dp[i] = mn + 2 * x[i];
		dp[i] = min(dp[i], dp[now] + t);
	}
	cout << e + dp[n - 1] << "\n";
	return 0;
}


