#include<iostream>
using namespace std;

typedef long long ll;

int main(){
	static ll N,E,T;
	static ll x[100010];
	scanf("%lld%lld%lld",&N,&E,&T);
	for(int i = 1 ; i <= N ; i ++){
		scanf("%lld",&x[i]);
	}
	
	static ll dp1[100010];
	static ll dp2[100010];
	for(int i = 0 ; i < 100010 ; i ++){
		dp1[i] = dp2[i] = 1000000000000000000;
	}
	dp1[0] = 0;
	int r = 1;
	for(int i = 1 ; i <= N ; i ++){
		dp1[i-1] = min( dp1[i-1] , dp2[i-1] );
		dp2[i] = min( dp2[i] , dp2[i-1]+2*(x[i]-x[i-1]) );
		while(r+1 <= N && 2*(x[r+1]-x[i]) <= T)r ++;
		dp1[r] = min( dp1[r] , dp1[i-1]+T );
		if(r+1 <= N)dp2[r+1] = min( dp2[r+1] , dp1[i-1]+2*(x[r+1]-x[i]) );
	}
	cout << min(dp1[N],dp2[N])+E << endl;
}
