#include <stdio.h>
#include <algorithm>
using namespace std;

int N,E,T,X[100100];
long long D[100100],W[100100];

int main()
{
	scanf ("%d %d %d",&N,&E,&T);
	for (int i=1;i<=N;i++) scanf ("%d",&X[i]);
	W[0] = -2 * X[1];
	for (int i=1;i<=N;i++){
		int j = lower_bound(X,X+i,X[i]-T/2) - X;
		if (j){
			j--;
			D[i] = D[j] + T;
			if (j){
				j--;
				if (D[i] > W[j] + 2 * X[i])
					D[i] = W[j] + 2 * X[i];
			}
		}
		else D[i] = T;

		W[i] = D[i] - 2 * X[i+1];
		if (W[i] > W[i-1])
			W[i] = W[i-1];
	}

	printf ("%lld\n",D[N]+E);

	return 0;
}